Javascript Image Handler

Asked

Viewed 563 times

5

Is there any image handler similar to canvas or jimp for node.js?

Explanation of why you don’t want to use either: So I was trying to use canvas as a test, and it’s taking too long to compile the file, and the jimp did not write the file at the same time as its composition. And it also took a long time.

OBS: That contains how to place two images and return one.

1 answer

2


The module gm is a "wrapper" for Graphicsmagick and Imagemagick for node.js, the great advantage is that it is very fast and allows you to do everything that Imagemagick/Graphicsmagick has to offer. The biggest drawback is that you need to install the binaries of the two separately.

If you choose to use it, the function below should do what you want:

gm("img.png").append("another.jpg", true).write('output.jpg', function(error){})

https://github.com/aheckmann/gm

https://imagemagick.org/script/command-line-options.php

  • Thank you, I tested it yesterday and it’s really fast

Browser other questions tagged

You are not signed in. Login or sign up in order to post.