kevva / to-ico

Convert PNG to ICO in memory
MIT License
137 stars 19 forks source link

Document unsupported formats #6

Closed gianluca-nitti closed 7 years ago

gianluca-nitti commented 7 years ago

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.

jdalton commented 7 years ago

I hit this and was wondering why I had a corrupt ico. This explains it.

sindresorhus commented 7 years ago

Merging this, but we should really find a better PNG encoder/decoder: https://github.com/kevva/to-ico/issues/16

kevva commented 7 years ago

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.

gianluca-nitti commented 7 years ago

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).

kevva commented 7 years ago

No worries, it's understandable since there are a lot of forks of it with similar names :).