Questions tagged [gm]

Use this tag for questions regarding usages of the gm library for node.js

gm, and for node.js, is a node.js library that can execute native commands for image processing.

119 questions
0
votes
2 answers

resize an image without uploading it to anywhere using gm in nodejs

I'm uploading an image using multipart/form-data, i want to resize it before storing it anywhere on the disk. I'm using gm to accomplish this but was not able to do it.
Subramanyam M
  • 335
  • 2
  • 6
  • 18
0
votes
1 answer

nodejs imagemagick how to return text

I'm stuck in the middle of the process of calculating the average color of an image via gm's subclass imagemagick. After resizing the image into a 1x1 image, I need to return the image information by "txt:-" so therefore im using the .out() command…
sami_analyst
  • 1,751
  • 5
  • 24
  • 43
0
votes
0 answers

nodejs gm using imagemagick morphology

I would like to use the command convert in.png -morphology Close Square out.jpg with the gm module using the imagemagick subclass : var gm = require('gm').subClass({ imageMagick: true }); gm(FILEPATH).morphology('...')...; But this method does…
sami_analyst
  • 1,751
  • 5
  • 24
  • 43
0
votes
2 answers

How do I rotate a text and then draw in graphicsmagick?

How do I rotate a text and then draw in graphicsmagick? It a simple question, but I couldn't understand it from the API. Help would be appreciated. Thank you. I am using gm by the way, but doing it from the command line is enough also. Also, there…
Ali Somay
  • 585
  • 8
  • 20
0
votes
1 answer

running cli commands with gm module

I want to run the following task: // getting the average color of the mask area convert demp.png \( demo_mask.png -negate \) -compose copyopacity -composite -scale 1x1! -format "%[pixel:u.p{0,0}]" info: via nodejs gm module using the imagemagick…
sami_analyst
  • 1,751
  • 5
  • 24
  • 43
0
votes
1 answer

How to remove OpenMP from GraphicsMagick on Windows server

I am using GraphicsMagick 1.3.26 on server. Due, to performance impact. I want to remove OpenMP feature from it. Kindly provide me the steps to remove the same for windows machine. Thanks.
0
votes
0 answers

Graphicsmagick is taking more processing time on server

I am using GraphicsMagick to colorize multiple layers of images and composing it to form single image and returning it. On local it was taking around 30ms to process single layer (1000 x 1000). Following is the image. Following is my colorization…
0
votes
1 answer

Piping resized image to express response setting response header to 'Content-Length:0' and no data in response

I am building a dummy image generator to improve my understanding of Node and Express. I get the dimensions from the URL and use GM package to resize it. The resulting stream is piped into the response. But I don't get the data on the front end and…
larrydalmeida
  • 1,570
  • 3
  • 16
  • 31
0
votes
1 answer

node.js Async : crop image and upload to server

I want to crop an image into various sizes and upload them to AWS S3. Cropping sizes are stored in an array. I am using async waterfall and series method to achieve this. async.each(crop_sizes,function (result,cb) { async.waterfall([ …
Jabaa
  • 1,743
  • 7
  • 31
  • 60
0
votes
0 answers

Express JS : image cropping failed on large sized images

I have an image uploading system(Upload image to AWS s3) and cropping image into various cropped sizes after upload But the image cropping is failed while upload large images there is no memory leak issue in but i got 0 byte image in s3 bucket. Here…
Jabaa
  • 1,743
  • 7
  • 31
  • 60
0
votes
1 answer

Rotate a specific page in multipage tiff file using GM module in Node JS

I am using the GraphicsMagick module for node.js to manipulate my multipage Tiff document. I am trying to find a way to rotate a specific page and rotate it without splitting the file into individual tiff files, do the operation and then merge them.…
Vmal
  • 27
  • 9
0
votes
1 answer

How to nest imagemagick commands in node.js gm library?

Using Imagemagick in node.js through the gm library (https://github.com/aheckmann/gm): var gm = require('gm').subClass({ imageMagick: true }); I am able to flatten pictures, like this: convert img1.png img2.png img3.png -flatten out.png with this…
cesarpachon
  • 1,179
  • 2
  • 10
  • 23
0
votes
3 answers

How to convert multiple tiff file to png files using gmmagick?

I have to convert multipple tiff to separate png files.For isntance i have a tiff file which have a 3 pages and i'd like to convert it 3 separate png's.In below code i could only convert first page of tiff file into png.…
So_oP
  • 1,211
  • 15
  • 31
0
votes
0 answers

Why I cannot run this super simple resizing an image code with gm node package?

here is my whole code: var fs = require('fs') , gm = require('gm'); // resize and remove EXIF profile data gm('./image.jpg') .resize(240, 240) .noProfile() .write('./image2.jpg', function (err) { if (!err) { console.log('done') } else {…
Joseph
  • 1,676
  • 2
  • 10
  • 20
0
votes
1 answer

TypeError: gm.compare is not a function

I using Node v6.9.2 , I want to compare two images to each other and get the result, but its seems like the gm.compare is not a function! If I removed the "subClass({ imageMagick: true });" error will appears Error: spawn gm ENOENT what should I do…