|
|
@ -245,7 +245,11 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
|
|
|
|
image.setColor( i, tqRgba(c,c,c,0xff) );
|
|
|
|
image.setColor( i, tqRgba(c,c,c,0xff) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
|
|
|
|
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
|
|
|
|
|
|
|
|
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
|
|
|
|
|
|
|
|
const int g = info_ptr->trans_color.gray;
|
|
|
|
|
|
|
|
#else
|
|
|
|
const int g = info_ptr->trans_values.gray;
|
|
|
|
const int g = info_ptr->trans_values.gray;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
if (g < ncols) {
|
|
|
|
if (g < ncols) {
|
|
|
|
image.setAlphaBuffer(TRUE);
|
|
|
|
image.setAlphaBuffer(TRUE);
|
|
|
|
image.setColor(g, image.color(g) & TQRGB_MASK);
|
|
|
|
image.setColor(g, image.color(g) & TQRGB_MASK);
|
|
|
@ -273,7 +277,11 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr )
|
|
|
|
info_ptr->palette[i].red,
|
|
|
|
info_ptr->palette[i].red,
|
|
|
|
info_ptr->palette[i].green,
|
|
|
|
info_ptr->palette[i].green,
|
|
|
|
info_ptr->palette[i].blue,
|
|
|
|
info_ptr->palette[i].blue,
|
|
|
|
|
|
|
|
#if PNG_LIBPNG_VER_MAJOR>1 || ( PNG_LIBPNG_VER_MAJOR==1 && PNG_LIBPNG_VER_MINOR>=4 )
|
|
|
|
|
|
|
|
info_ptr->trans_alpha[i]
|
|
|
|
|
|
|
|
#else
|
|
|
|
info_ptr->trans[i]
|
|
|
|
info_ptr->trans[i]
|
|
|
|
|
|
|
|
#endif
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
i++;
|
|
|
|
i++;
|
|
|
|