node-imagemagick

Retrieving output from Node script in a Grunt task

帅比萌擦擦* 提交于 2019-12-25 02:53:23
问题 I'm fairly new to Grunt, so this might be quite a basic question. I've got a Gruntfile.js that looks like this: /*global module:false*/ module.exports = function (grunt) { grunt.initConfig({ }); grunt.registerTask('default', 'measureText'); grunt.registerTask('measureText', 'Measures size of text', function() { grunt.log.writeln('========================================================================'); grunt.log.writeln('= output of ImageMagick should be on next line: ='); var im = require(

Asynchronous GraphicsMagick For Node

亡梦爱人 提交于 2019-12-18 09:11:48
问题 I am using GraphicsMagick for node. I basically crop the photos and retrieve the exif data of the photos uploaded by the user. I don't want to block the flow of request waiting for these task to be completed, therefore I need to use asynchronous functions to be able to do so. And I think I should be able to as these are I/O operations which node.js makes async itself. But as I see all the functions in GraphicsMagick for node are synchronous functions. So I am not being able to sure as to how

ImageMagick identify reports incorrect GIF frame count

廉价感情. 提交于 2019-12-11 00:14:58
问题 I'm using ImageMagick to do some stuff with GIF images. One of my steps is identify ing the number of frames in an image. I'm calling identify via node-imagemagick (and later gm) like this: identify -format '%T,%w,%h ' test.gif Most of the time I correctly get 53 space-separated values for 53 frames. But sometimes I get 47 or 50 frames for the same GIF image (that has 53 frames). How can this possibly happen? I'm running convert -coalesce -append test.gif other.gif at the same time, but it

nodejs imagemagick converting svg to png adds a white background, how to keep it transparent?

心已入冬 提交于 2019-12-10 12:01:37
问题 I'm trying to use imagemagick to convert svgs to pngs, rescale them and put them in a response stream. I'm using https://www.npmjs.com/package/imagemagick like this: var imageUri = __dirname + '/images/' + project + '/' + image + '.svg'; console.log(imageUri); var svg = fs.readFileSync(imageUri, 'utf8'); res.writeHead(200, {'Content-Type': 'image/png' }); var size = '' + (100 * scale); var conv = im.convert(['svg:-', '-resize', size + 'x' + size, 'png:-']); conv.on('data', function(data) {

ImageMagick sampling factor

泪湿孤枕 提交于 2019-12-10 03:54:09
问题 I have been using ImageMagick command line tool for jpeg compression of the images. However, I'm trying to understand the role of sampling factor. It says the sampling factor is used to specify the block size i.e. 8x8 or 16x16. However, I can't find the default values used if I omit this parameter. Also, I tried fetching properties of an image by using the following command: identify -verbose image.jpg It shows sampling factor values as 1x1, 1x1, 1x1. What does it mean? Either it should be

Imagemagick - change policy.xml on Heroku

别来无恙 提交于 2019-12-07 22:38:00
问题 I'm trying to access images via https on Heroku with Imagemagick. How can I change the policies (in policy.xml) on Heroku? Heroku made an "ImageMagick security update" in May, 2016: https://devcenter.heroku.com/changelog-items/891 I can see the policy list, after typing heroku run bash and convert -list policy : Path: [built-in] Policy: Undefined rights: None Path: /etc/ImageMagick/policy.xml [...] Policy: Coder rights: None pattern: HTTPS [...] How can I change the policy? update 1: this is

Imagemagick - change policy.xml on Heroku

微笑、不失礼 提交于 2019-12-06 13:26:40
I'm trying to access images via https on Heroku with Imagemagick. How can I change the policies (in policy.xml) on Heroku? Heroku made an "ImageMagick security update" in May, 2016: https://devcenter.heroku.com/changelog-items/891 I can see the policy list, after typing heroku run bash and convert -list policy : Path: [built-in] Policy: Undefined rights: None Path: /etc/ImageMagick/policy.xml [...] Policy: Coder rights: None pattern: HTTPS [...] How can I change the policy? update 1: this is the error in the log file: Command failed: convert.im6: not authorized `//scontent-fra3-1.xx.fbcdn.net

ImageMagick with Visual Studio

☆樱花仙子☆ 提交于 2019-12-06 07:19:39
问题 I'm trying to write a sample ImageMagick program in Visual Studio 2010. I have binary distribution of ImageMagick already installed on my system as I can use command line interface of ImageMagick. However, when I try to include "Magick++.h" in my C++ program, it says it can't open source file. I found the instructions on compiling and building ImageMagick from source, but is it possible to change my visual studio project settings so it can pick necessary references/libraries from the already

ImageMagick sampling factor

感情迁移 提交于 2019-12-05 04:49:13
I have been using ImageMagick command line tool for jpeg compression of the images. However, I'm trying to understand the role of sampling factor. It says the sampling factor is used to specify the block size i.e. 8x8 or 16x16. However, I can't find the default values used if I omit this parameter. Also, I tried fetching properties of an image by using the following command: identify -verbose image.jpg It shows sampling factor values as 1x1, 1x1, 1x1. What does it mean? Either it should be 8x8 or 16x16 or 32x32.... Could anyone please give me an idea where to find these details? Iamiuru From

ImageMagick with Visual Studio

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 11:54:04
I'm trying to write a sample ImageMagick program in Visual Studio 2010. I have binary distribution of ImageMagick already installed on my system as I can use command line interface of ImageMagick. However, when I try to include "Magick++.h" in my C++ program, it says it can't open source file. I found the instructions on compiling and building ImageMagick from source, but is it possible to change my visual studio project settings so it can pick necessary references/libraries from the already installed version of ImageMagick? I am by no means an expert, but here is what worked for me: Using