Does anyone know of a node.js module for creating indexed PNGs?
I've looked through this list of node graphics modules, and some of them allow png creation, but none seem to allow you to specify an index/pallete scheme.
Just some extra info: I have a 2d Array representing pixels, each referring to an index of a 1d palette array. From this I would like to generate a valid indexed png file (1 channel, with 4 bits per channel).
pngparse will allow you to index, but I'm not sure about palette support.
Just found this, which allows you to use imagemagick via Node: https://github.com/rsms/node-imagemagick
Maybe png-stream could be worth a look. According to them:
You can also write data in the indexed color space by first quantizing it using the neuquant module.
Also, depending on what you're intending to do, another (cumbersome) possibility would be to use sng to convert PNG files to and from a textual representation.
Another option would be JS-PNG