If you'd like to see it in action:
Change palette entry 0 to black
Change palette entry 0 to black and 1 to white
A couple of questions for Brad regarding his implementation:
- Is it possible to change the palette entry for palette entries > 15 (F)? It seems not since we're looking for multiples of 7 for each change
- I do some error checking of the PNG (ie. check for valid signature, make sure png type is indexed palette). Is the "right" way to react to errors to return 404?
A few final notes:
- Right now it breaks if you try and change a nonexisting palette entry (PNGs don't have fixed size palettes). The test image only has entries 0 and 1. I'll fix this before I submit the patch.
Updated: The patch is now available here.