Re: [dev] Introducing the imagefile-format

From: FRIGN <dev_AT_frign.de>
Date: Tue, 29 Jul 2014 01:42:50 +0200

On Tue, 29 Jul 2014 00:43:20 +0200
Robert Hülle <robert.hulle_AT_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 <dev_AT_frign.de>
Received on Tue Jul 29 2014 - 01:42:50 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 29 2014 - 01:48:11 CEST