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
1 answer

saving image file in mongodb using node gm (graphic magic)

I am totally new in node and mongodb concepts. I am trying to save the image, file (meta data) saved successfully but its chunks are not saving. I also read gm documentation but did not helped alot plus i am not facing any error.…
Qubaish Bhatti
  • 700
  • 5
  • 22
0
votes
0 answers

Commenting an image util module gm

I'm trying to comment on an image using the gm module, but it only creates the same image I used without the comment. Code in Context var gm = require('gm'); gm('api/routes/image1.jpg') .comment(['Text Example']) …
Jonathan
  • 127
  • 1
  • 8
0
votes
1 answer

Overlaying text on animated GIF with gm quite slow

I'm using this bit of code to call gm in Node.js to overlay text on animated GIFs: var gm = require('gm'); gm(infile) .stroke("#000000") .fill('#ffffff') .font("./impact.ttf", 42) .dither(false) .drawText(0, 0, text, 'South') …
evilSnobu
  • 24,582
  • 8
  • 41
  • 71
0
votes
2 answers

node gm - s3 upload on heroku (0 byte)

I'm trying to build an app to manipulate images and upload them on s3. The code works perfectly on localhost. But when I deploy the same code to heroku, the uploaded image on s3 is 0 byte empty: here is my code: const fs = require('fs'); const…
JohnnyTheTank
  • 668
  • 5
  • 14
0
votes
1 answer

Not able to bluebird.Promisifyall gm

The gm is giving the gm().write() expects a callback function error. The write function comes from fs so I also promisified it. Still it does not work. var gm = bluebird.promisifyAll(require("gm")); var fs =…
user3236751
0
votes
0 answers

Merging GIF with PNG file

I want to combine 4 image into one, 2 GIF and 2 PNG. I'm doing this with graphic image but unfortunately the plugin is picking up the first frame of GIF only. The end result is a tile of 4 standstill image. Is there any method I missed out from…
1myb
  • 3,536
  • 12
  • 53
  • 73
0
votes
0 answers

Nodejs - Graphic Magic or ImageMagic - overlay as Photoshop

Is it possible to compose an image with gm as we do it with photoshop. Here is a picture what I mean: What I am using now is multibly, but it doesn't provide the same effect as overlay so I was wondering if there is a way to achieve this. Here is…
Alex
  • 579
  • 5
  • 24
0
votes
1 answer

Inserting one png above another by coords

How I can insert one page above another in specific cords. I want to use gm library for imageMagic but I cant find such way. maybe another libs exist
John
  • 21
  • 3
0
votes
1 answer

Add transparent color layer to b&w image using ImageMagick

I'm trying to take a black and white image and add a red transparent layer on top. Something similar to the image. Does anyone know how I can do this using ImageMagick in Node using gm?
Bcf Ant
  • 1,639
  • 1
  • 16
  • 26
0
votes
0 answers

Saved image not imediatly available. As if the request resolves before it is complete

A user selects an image (in this case from Facebook, but I don't that is relevant to the problem). A request gets sent to the server to fetch the image and save it locally. The request resolves with 200. The resolved request is picked up on the…
SystemicPlural
  • 5,629
  • 9
  • 49
  • 74
0
votes
2 answers

Node Js gm, Resize and overlap

I want to insert an image(img1) into another(img2) but before inserting, img1 must be resized based on img2 dimensions. how can I achieve this with nodeJs gm ? I'm using imageMagic.
Saman Mohamadi
  • 4,454
  • 4
  • 38
  • 58
0
votes
1 answer

ImageMagick: why resized GIF image seems to have some colors replaced by white?

Was wondering if anyone knows what might be causing this. Original image: Thumbnail code (using http://aheckmann.github.io/gm/): const generateThumb = () => gm(this.getReadStream()) .in('-thumbnail', '400x400^') .in('-gravity', 'center') …
Olivier Lalonde
  • 19,423
  • 28
  • 76
  • 91
0
votes
2 answers

Error: Stream yields empty buffer using gm on nodejs (Windows)

When I try to execute this simple example of code using gm and nodejs on Windows: var gm = require('gm').subClass({imageMagick: true}); gm(50, 50, '#000F') .setFormat('img') .fill('black') .drawCircle( 50, 50, 60, 60 ) …
Airton Gessner
  • 215
  • 2
  • 11
-1
votes
1 answer

Resizing image on server size

In my node.js project, I want to be able to pull images from the web, resize them to the size I want, and output as a base64 string. Which library is the best way of doing this? I tried a bunch of different ones but none of them are working: var url…
Chris Jones
  • 856
  • 1
  • 11
  • 24
1 2 3 4 5 6 7
8