3 ms·
Cool. Nice, creative work. Indexed PNGs seem unfortunately under utilized. I happen to have just opened a PR to support indexed PNGs in node-canvas (HTML Canva
by zbjornson 9y ago
Cool. Nice, creative work. Indexed PNGs seem unfortunately under utilized.
I happen to have just opened a PR to support indexed PNGs in node-canvas (HTML Canvas impl for node) based roughly on the proposed pixelFormat API [1,2] for the same reason that the space savings can be immense.
It's also straightforward to change the palette of an indexed PNG after it's encoded because you don't need to re-compress the body. This lets you do cool tricks with recoloring images.
[1] https://github.com/Automattic/node-canvas/pull/935 https://github.com/Automattic/node-canvas/pull/935
[2] https://github.com/WICG/canvas-color-space/blob/master/CanvasColorSpaceProposal.md https://github.com/WICG/canvas-color-space/blob/master/Canva...
- TazeTSchnitzel 9y agoDecent image editors etc do often output indexed PNGs. And thankfully, modern viewers do actually support them.