Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What packages are available for node.js to do image cropping? [closed]

I'm creating a website using node.js. I have seen many libraries mentioned that piggy back on top of imagemagick etc. There is a list here: https://github.com/ry/node/wiki/modules#graphics

What I'm trying to do is take the image that a user uploads, crop it/size it to certain dimensions the site requires. What is the best/most active script to do this? I'd like one with npm support. Does anyone have actual experience using some of these?

like image 674
Travis Avatar asked Dec 27 '10 19:12

Travis


People also ask

Is NodeJS suitable for image processing?

Not that it's not possible, you can read bytes and manipulate them, so it's possible, but it would not be the best fit. Node is single threaded and image manipulation is usually CPU-bound and highly parallelizable so multithreaded implementations are likely to be faster.

How many packages are there in node JS?

How many packages are there in NPM? Over 1.3 million packages are available in the main NPM registry.


1 Answers

Think I found a decent imagemagick wrapper that can handle this pretty well. Even in memory before writing the file to disk. (aka user upload -> node imagemagick lib -> cdn and never touching the disk ... which is what I want)

https://github.com/rsms/node-imagemagick

like image 189
Travis Avatar answered Oct 13 '22 18:10

Travis