summaryrefslogtreecommitdiff
path: root/qt3/qt3-libpng14.patch
blob: 4971cfe00e16339fdc04f143a23b4eec3e8eb0cc (plain)
    1 --- qt-x11-free-3.3.8/src/kernel/qpngio.cpp.orig	2007-02-02 23:01:15.000000000 +0900
    2 +++ qt-x11-free-3.3.8/src/kernel/qpngio.cpp	2011-01-02 09:20:40.151999994 +0900
    3 @@ -159,7 +159,11 @@
    4  		image.setColor( i, qRgba(c,c,c,0xff) );
    5  	    }
    6  	    if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
    7 +#if PNG_LIBPNG_VER < 10400
    8  		const int g = info_ptr->trans_values.gray;
    9 +#else
   10 +		const int g = info_ptr->trans_color.gray;
   11 +#endif
   12  		if (g < ncols) {
   13  		    image.setAlphaBuffer(TRUE);
   14  		    image.setColor(g, image.color(g) & RGB_MASK);
   15 @@ -187,7 +191,11 @@
   16  		    info_ptr->palette[i].red,
   17  		    info_ptr->palette[i].green,
   18  		    info_ptr->palette[i].blue,
   19 +#if PNG_LIBPNG_VER < 10400
   20  		    info_ptr->trans[i]
   21 +#else
   22 +		    info_ptr->trans_alpha[i]
   23 +#endif
   24  		    )
   25  		);
   26  		i++;

Generated by cgit