Questions tagged [node-imagemagick]

node-imagemagick is an Imagemagick module for Node.

node-imagemagick is an module for Node.

Github repository

55 questions
2
votes
2 answers

node.js uploading output of imagemagick to AWS S3

I am having a problem manipulating the image with imagemagick then upload it to S3. The resulting object has a different (bigger) size and seems to be corrupt. If I make an intermediate step and save the output to local tmp file first and read it…
Dmitry Fink
  • 1,032
  • 1
  • 13
  • 31
2
votes
3 answers

Asynchronous GraphicsMagick For Node

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…
Saransh Mohapatra
  • 9,430
  • 10
  • 39
  • 50
2
votes
0 answers

how to crop with node-imagemagick, with a buffer as input, and stdout as output?

I'm using node-imagemagick for the first time. Disclaimer: I've never used imagemagick, and am not much of a javascript guy. Most experience is in C/C++, Objective-C. I'm writing a snippet for a server side process that needs to take an input…
Dan Morrow
  • 4,433
  • 2
  • 31
  • 45
1
vote
1 answer

NodeJS ImageMagick How to convert Image with Transparent background

I want to convert my png with white background to transparent background png. Here is my code. im.convert( [source, '-flatten', '-transparent', path_to], function (err, stdout) { if (err) { reject(err); …
Cagrison
  • 150
  • 3
  • 13
1
vote
0 answers

Error: write EPIPE while using imagemagick To write a lambda function

var gm = require("gm").subClass({ imageMagick: true }); function conversion(image) { const image = gm(image); image.orientation(function(err, value) { if (err) { console.log("Error Occurred :",err); …
Tanjil
  • 11
  • 2
1
vote
0 answers

how to get cropped image names and paths after crop by imagemagick

I crop an image file by node module imagemagick. It crops successfully, but how to get the names (or paths) of cropped result images My code: const im = require('imagemagick'); .... const imgFile = "img.png"; im.convert([imgFile, '-crop', '300x300',…
Vu Le Anh
  • 708
  • 2
  • 8
  • 21
1
vote
1 answer

How Can I change Image type with NodeJS?

I need to change my Image type after Uploading. I have tried with image_magick but failed.What is the best way to change a image type.
Rabbani_
  • 450
  • 1
  • 10
  • 30
1
vote
0 answers

how to achieve the following effect in imagemagick

I am trying to get sketch effect and i have the imagemagick command line code as follows convert 1.jpg -colorspace gray ( +clone -blur 0x8 \) +swap -compose divide -composite -linear-stretch 2%x20% cousincs.jpg I am using gm module and I tried…
ayniam
  • 573
  • 2
  • 8
  • 27
1
vote
1 answer

Smooth text edge with ImageMagick

I'm using ImageMagick ver 6.9.3-7 to write text over pictures. I've noticed that the same text with the same font looks much better in html canvas and I'm trying to make it looks the same. This is how it looks in the html5 canvas: and this is how…
Rotem
  • 2,306
  • 3
  • 26
  • 44
1
vote
0 answers

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

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 +…
just_user
  • 11,769
  • 19
  • 90
  • 135
1
vote
1 answer

imagemagick tile image with Coordinate

Using imagemagick with nodejs, I would like to rename my output with x-y by column and rows. i can do on terminal but how can i implement this on my script as well. Terminal example : convert img.jpg -crop 512x512 -set filename:tile…
1
vote
1 answer

Tile images with imagemagick with NodeJs

With this script i can tile my (4096x2048) images into 32 tiles(512x512). I would like to give a "X, Y, Z" cordinate to each exported image. For now i would like to keep Z as 0 always. Example: output-1-0-0.jpg output-1-1-0.jpg var http =…
1
vote
0 answers

imagemagick big stroke width adds strange effect like paint fluid

I've an issue with a script named pixenate which works as a simple image editor using javascript, imagemagick and perl. After deep troubleshooting I found that the issue happens when I use a big stroke width (14+) when I draw something on an image…
1
vote
1 answer

Making mosaic images with GM() and NodeJS

I'd like to make mosaic images using gm() and NodeJS but it seems not working with my code, I think that the problem is due to the original size of the image (600 * 200), my template is smaller than the images... My result should be something like…
tonymx227
  • 5,293
  • 16
  • 48
  • 91
1
vote
2 answers

How can i force the imagemagick module of nodejs to output one single image only?

I am using the imagemagick module with Nodejs im = require('imagemagick'); The imagemagick module uses the imagemagick command line tools. I use the convert method to crop an image im.convert([image_path, '-crop', '200x150', '-gravity', 'center',…
Thariama
  • 50,002
  • 13
  • 138
  • 166