On Tue, 29 Jul 2014 00:43:20 +0200 Robert Hülle <robert.hu...@gmail.com> wrote:
> Possible problem with grayscale PNGs in png2if. I get bytes "00 ff 00 > ff" for black pixel when it should be "00 00 00 ff". At first I thought, this couldn't be, as I set PNG_TRANSFORM_EXPAND in png_read_png, but after some research, I found out I misread the manual in which is clearly stated PNG_TRANSFORM_EXPAND only expands grayscale to 8 bit, not RGBA. The necessary function is png_set_gray_to_rgb(). I added it and now it's working just fine, using this file[0] as a test. Thanks a lot for reporting this, Robert! I was already suspicious about the fact these tools ran so seemingly seamlessly from day one. It's fixed and committed. Cheers FRIGN [0]: http://palmzlib.sourceforge.net/images/boat1.png -- FRIGN <d...@frign.de>