I found a quite large list of available libraries on Node.JS wiki but I'm not sure which of those are more mature and provide better performance. Basically I want to do the following:
Big plus if the node package works on both Linux and Windows.
Answering my own question
I spent two days digging through Node.js graphics libraries.
<canvas>
API. It's a huge plus for a library.montage
which does exactly what I need.also VIPS-based. Actively maintained as of 2024. Sample usage to convert an input buffer to 320x240 and PNG format, and get an output buffer out:
const sharp = require('sharp');
const outBuf = await sharp(inBuf).resize(320, 240, { fit: 'fill' })
.png().toBuffer()
I also looked at other libraries from the list but most of them are either very immature or do not suit my use case. I would really like to try migrating to either Node-Canvas or Node-Vips when Node-Waf gets ported to Windows but until then I'll stick to node-imagemagick.