Login  Register

Re: Indexed PNG

Posted by ct on Mar 12, 2013; 8:51am
URL: https://forum.jogamp.org/Indexed-PNG-tp4028430p4028591.html

Basically, my patch is based on a test case from PNGJ, as mentioned by Hernan.

The only thing one needs to do is to convert a scanline of palette indices to a scanline of colors. In my patch I've done exactly that by using PNGJ's helper classes. Further, the getPixelRGBA8 method now takes a scanline of int[], rather than of class ImageLine. This allows me to handle scanlines uniformly. I also cleaned up the PNGImage constructor a bit.