Closed gianluca-nitti closed 7 years ago
I hit this and was wondering why I had a corrupt ico. This explains it.
Merging this, but we should really find a better PNG encoder/decoder: https://github.com/kevva/to-ico/issues/16
Some of this is incorrect. First and foremost, we're not using the linked module, but https://github.com/lukeapage/pngjs which does support interlacing. Indexed color is still unsupported though.
First and foremost, we're not using the linked module, but https://github.com/lukeapage/pngjs
Oh I see now, sorry for the misunderstanding. Most likely I got confused by the two modules having very similar names on npm (pngjs
and node-pngjs
).
No worries, it's understandable since there are a lot of forks of it with similar names :).
After failing to convert a png to ico (I was getting an ico with pixels of random colors), I did some research and I found out that my image was in the indexed colormap format (8 bits per pixel), while pngjs only supports 8 bits per channel depth. I suggest adding this to the readme so users can find this out without needing to digg in the documentation of the underlying modules.