node-imagemagick-native icon indicating copy to clipboard operation
node-imagemagick-native copied to clipboard

Poor quality when converting favicon ICO to PNG

Open dstaver opened this issue 9 years ago • 0 comments

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.

klikk.ico.zip

dstaver avatar Aug 28 '16 12:08 dstaver