Questions tagged [node-gm]

ImageMagick or GraphicsMagick for nodeJS

8 questions
7
votes
1 answer

Meteor.JS CollectionFS Video to Image Thumbnails (Graphics Magick)

I am working on one Meteor App where I am using CollectionFS to upload Files. I am able to upload and generate thumbnails for Images. But my Issue is : How should I create thumbnails for Videos? I can see that it is possible via command line:…
Manu
  • 301
  • 2
  • 9
3
votes
1 answer

resizing image while saving it's exif orientation with node-gm

I'm writing a nodeJS 5.3.0 application using gm (http://aheckmann.github.io/gm/) I know that it uses the GraphicsMagicK library. the problem is that I'm having is that after I resize an image, it loses it's exif format. the code samples actually…
ufk
  • 30,912
  • 70
  • 235
  • 386
2
votes
1 answer

Node-gm circular image crop using Imagemagick

I've been trying to use node-gm + Imagemagick to circular crop an image. Anyways, here's my attempt at creating a mask using a black circle. var original = 'app-server/photo.jpg'; var output = 'app-server/photo.png'; var maskPath =…
parliament
  • 21,544
  • 38
  • 148
  • 238
2
votes
0 answers

How and When to generate thumbnail in node.js?

So here is how my app handle image uploading and generate thumbnail router.post('/upload', saveupload, generateThumb, saveDB) function generateThumb (req, res, next){ var filePath = req.files.file.path; var fileDir = req.files.file.dir; …
paynestrike
  • 4,348
  • 14
  • 46
  • 70
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
0
votes
1 answer

Draw text on image using graphicsmagick (node-gm) drawText

Have some array like this: var myArray=[ { title: 'Some title', time: 'Some time'}, ... ]; And node-gm code: gm('bg.png') .fill("#ffffff") .font("Phenomena-Bold.otf", 27) .drawText(225, 75, "Some text") .write("result.png", function…
Dan Mishin
  • 107
  • 2
  • 8
0
votes
1 answer

Is there a way in node gm(graphic magic) crop by shape?

I'm trying to crop picture by a shape picture and tried this let imageDoc = gm(filePath).resize(100, 100); imageDoc.mask(`${shapesPath}/hexagon.svg`); It acts like nothing was done but resizes correctly. Also tried using png file instead of svg,…
Shekspir
  • 87
  • 2
  • 12
0
votes
1 answer

can't get image format - spawn EACCES error

I'm writing a NodeJs 0.10 application using ImageMagicK for nodeJS (gm) i use restify for the API creation. i'm trying to find out if the uploaded file is an image by checking it's format. i'm fetching the uploaded image path using…
ufk
  • 30,912
  • 70
  • 235
  • 386