updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / qt3-trinity / qt3-png14.patch
blobe8a194529b5f8f8dd6b76a2254d2ce2fa82a6c7e
1 --- 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) );
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]
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) {