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
16
votes
5 answers

Error: Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h"

I'm trying to find the dimensions of the images in a production machine.It returns error. Could not execute GraphicsMagick/ImageMagick: identify "-ping" "-format" "%wx%h" "uploads/userPhoto-1499669685192.png" this most likely means the gm/convert…
akash gaur
  • 303
  • 1
  • 3
  • 9
10
votes
10 answers

XCode 8 GM Seed - Error while uploading to TestFlight

While Uploading the .ipa file (Generated using Xcode GM Seed) into TestFlight, I am receiving the following error. ERROR ITMS-90596: "Invalid Bundle. The asset catalog at 'Payload/Application.app/Assets.car' can't be read. Try rebuilding the app…
sel
  • 101
  • 1
  • 3
9
votes
5 answers

AWS Lambda not working along with the gm module

I am using AWS Lambda to resize my image in s3 bucket into different size variants using node js when an image is put into the s3 bucket. It was working till yesterday. Today when I use the same lambda function I get the following…
shubhamagiwal92
  • 1,362
  • 4
  • 25
  • 47
7
votes
0 answers

How to wordwrap in gm for node?

Found GM today need to include text in my image. Is there a way to make sure my text wraps if it's width is longer than my image width?
Justin Young
  • 2,393
  • 3
  • 36
  • 62
7
votes
1 answer

How to add centered text with gm for node (graphicsmagick/imagemagick)?

This relates to the "gm" extension for node, http://aheckmann.github.io/gm/docs.html I need to add some text centered around a bounding box (horizontally is enough). The function drawText() requires x,y coordinates, but there is no way to draw…
Rildo Pragana
  • 83
  • 1
  • 4
5
votes
1 answer

Creating a GIF from remote stream in graphicsmagick

I am creating a GIF from remote files in node currently by downloading each image to the file system into a tmp folder. I want to bypass saving the image to a tmp folder and save in memory instead. Is this possible? As you can see, I have a download…
Stretch0
  • 8,362
  • 13
  • 71
  • 133
5
votes
0 answers

nodejs GraphicsMagick (gm) passing stream to .composite()

Using Expressjs with gm (GraphicsMagick) module. I would like to use a stream as the input to .composite(). Is this possible, or is there any way of doing this? I can composite using a path or a variable containing a path to an image, but I would…
M3NTA7
  • 1,307
  • 1
  • 13
  • 25
4
votes
1 answer

gm convert: No decode delegate for this image format

I am getting the below error on an AWS EC2 instance (I specifically say that as I don't have an issue with this on my Mac): Error: Command failed: gm convert: No decode delegate for this image format…
Sean
  • 1,151
  • 3
  • 15
  • 37
4
votes
2 answers

GraphicsMagick / ImageMagick replace all non-transparent pixels (like Photoshop's Color Overlay)

I'm trying to replace all non-transparent pixels to a given color using GraphicsMagick for Node. Using a composite image is not an option, I simply need to change every non-transparent pixel to a given color. Original image: Goal: Transparent…
Adriaan Meuris
  • 351
  • 2
  • 12
4
votes
3 answers

Resize and compose two or more images using gm in Nodejs

Given two images, say under img (in size of 1024x768) folder (img1.png and img2.png), I need to resize img2 (say 300x300) and put on img1 in x and y (say 100, 200) from top left of img1. The end result should be 1024x768 size image. Using gm…
Ahmet Cetin
  • 3,683
  • 3
  • 25
  • 34
3
votes
2 answers

How to convert image into webp using gm in node.js

I was using gm for resizing images. Now I learn about webp to speed up my site. So I want to convert images into webp using same library. But the following does not work. How can I convert images into webp by gm? function resize(last) { …
Haseeb Ahmad
  • 7,914
  • 12
  • 55
  • 133
3
votes
0 answers

Remove image background in node

I am working on the project where I am capturing user's face from and putting it on the existing model. To combine face and model image I am using gm library from node; and for face detection I am using opencv. I am able to do both detect face and…
3
votes
2 answers

JS: Promise doesn't return value

I need to get a value of an asynchronous function. I tried to use Promise, but that does not work: const res = new Promise(function (resolve, reject) { gm(readStream).size({ bufferStream: true }, function (err, size) { if (!err) resolve(size) …
user3142695
  • 15,844
  • 47
  • 176
  • 332
3
votes
0 answers

Gm library doesnt show unicode character

So I wanted to display unicode characters with gm and therefore decided to use a unicode font. I ended using arial unicode ms, (I couldn't figure out how to use the google noto family and 'connect' the seperate ttf files). After trying to print a…
nonerth
  • 549
  • 2
  • 7
  • 19
3
votes
0 answers

GraphicsMagick color and mask opacity not working

Hi If anyone can help would be great. I am trying to create a mosaic of 25 images all together, and apply some effects on top. So I am starting with creating a mask.png which has rounded corners. Then with a for cycle for each tile I would like to…
Alex
  • 1,571
  • 3
  • 13
  • 16
1
2 3 4 5 6 7 8