node-imagemagick-native
node-imagemagick-native copied to clipboard
Poor quality when converting favicon ICO to PNG
Using imagemagick on command line:
convert -flatten -thumbnail 64x64 klikk.ico klikk.png
Using imagemagick native:
fs.writeFileSync('klikk.png', im.convert({ srcData: fs.readFileSync('klikk.ico'), srcFormat: 'ICO', format: 'PNG', width: 64, height: 64, quality: 100 }));
When comparing the resulting images the one converted with imagemagick native has siginificantly lower resolution than the one converted on command line.
I'm guessing that imagemagick native chooses the first image contained in the ICO file which is usually the lowest resolution version, while the convert command chooses the last which is usually the highest resolution version.