3 ms·
On top of the memory issue, jimp format support seems limited. No gif support for example. My personal favourite is node-canvas. It simply brings the HTML5 can
by hcho 10y ago
On top of the memory issue, jimp format support seems limited. No gif support for example.
My personal favourite is node-canvas. It simply brings the HTML5 canvas api to node.
- happyslobro 10y agoDoes node-canvas allow you to select high fidelity algorithms over fast algorithms? A while ago, I wrote a crop tool using browser canvas, and found that the results of a scaling operation were unacceptable, due to its fast downsampling algorithm. The gory details and a few attempts at higher quality scaling algorithm implementations are on SO: http://stackoverflow.com/questions/18922880/html5-canvas-resize-downscale-image-high-quality http://stackoverflow.com/questions/18922880/html5-canvas-res.... TL;DR: sending the image to the server and having GM scale it is faster and more reliable than your own scaling algorithm in single-threaded browser JS.
- hcho 10y agoI think node canvas is a wrapper over cairo. It lets you set a quality value too. Whether cairo is comparable to GM is something I don't know.