Matt,

This isn't a new problem, it's been around for a while (indeed I had  
thought we'd fixed it - it is fixed in fltk-1.3 at any rate...)

If you configure the build, the generated config.h file contains the  
lines:

/* #undef HAVE_PNG_GET_VALID */
/* #undef HAVE_PNG_SET_TRNS_TO_ALPHA */

Whereas what we really want is:

#define HAVE_PNG_GET_VALID 1
#define HAVE_PNG_SET_TRNS_TO_ALPHA 1


Which means that, in src/Fl_PNG_Image.cxx:

this test fails -

#  if defined(HAVE_PNG_GET_VALID) && defined(HAVE_PNG_SET_TRNS_TO_ALPHA)

which misses out some key functionality for the handling of alpha in  
PNG files.

Now, if I recall correctly, the bug arises due to some issue in our  
configure script. We do test for the presence of  
HAVE_PNG_SET_TRNS_TO_ALPHA but we then use the wrong key to set the  
option in the config.h file. Or something.

Also, if we are using the built in PNG lib (which does of course  
provide this ability) we never test for this at all, again causing us  
to set the wrong thing in config.h.

Note that we never seem to test for HAVE_PNG_GET_VALID at all and it  
does not seem to mean anything. It should probably be remove completely.

This bug does not exist at all in fltk-2 and seems to have been fixed  
in fltk-1.3.
This bug appears (for me) on OSX, linux and win32(Msys/mingw).

To be honest, my preferred fix is to modify src/Fl_PNG_Image.cxx to  
just assume this ability is always present, as it is in any recent  
build of PNG, AFAIK, then remove it from config.h and configure.

-- 
Ian



_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to