Annotation of /trunk/qt/patches/qt-3.3.8b-libpng14.patch
Parent Directory | Revision Log
Revision 1384 -
(hide annotations)
(download)
Thu Jun 30 08:12:37 2011 UTC (13 years, 2 months ago) by niro
File size: 1339 byte(s)
Thu Jun 30 08:12:37 2011 UTC (13 years, 2 months ago) by niro
File size: 1339 byte(s)
-patch to fix builds against libpng-1.4 and higher
1 | niro | 1384 | --- src/kernel/qpngio.cpp.orig 2010-01-16 22:02:41.000000000 +0100 |
2 | +++ src/kernel/qpngio.cpp 2010-01-16 22:03:56.000000000 +0100 | ||
3 | @@ -159,7 +159,7 @@ | ||
4 | image.setColor( i, qRgba(c,c,c,0xff) ); | ||
5 | } | ||
6 | if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) { | ||
7 | - const int g = info_ptr->trans_values.gray; | ||
8 | + const int g = info_ptr->trans_color.gray; | ||
9 | if (g < ncols) { | ||
10 | image.setAlphaBuffer(TRUE); | ||
11 | image.setColor(g, image.color(g) & RGB_MASK); | ||
12 | @@ -187,7 +187,7 @@ | ||
13 | info_ptr->palette[i].red, | ||
14 | info_ptr->palette[i].green, | ||
15 | info_ptr->palette[i].blue, | ||
16 | - info_ptr->trans[i] | ||
17 | + info_ptr->trans_alpha[i] | ||
18 | ) | ||
19 | ); | ||
20 | i++; | ||
21 | @@ -321,9 +321,9 @@ | ||
22 | png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) | ||
23 | if (image.depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { | ||
24 | QRgb trans = 0xFF000000 | qRgb( | ||
25 | - (info_ptr->trans_values.red << 8 >> bit_depth)&0xff, | ||
26 | - (info_ptr->trans_values.green << 8 >> bit_depth)&0xff, | ||
27 | - (info_ptr->trans_values.blue << 8 >> bit_depth)&0xff); | ||
28 | + (info_ptr->trans_color.red << 8 >> bit_depth)&0xff, | ||
29 | + (info_ptr->trans_color.green << 8 >> bit_depth)&0xff, | ||
30 | + (info_ptr->trans_color.blue << 8 >> bit_depth)&0xff); | ||
31 | for (uint y=0; y<height; y++) { | ||
32 | for (uint x=0; x<info_ptr->width; x++) { | ||
33 | if (((uint**)jt)[y][x] == trans) { |