1 |
ssuominen 10/07/04 11:51:56 |
2 |
|
3 |
Added: qt-4.5.3-libpng14.patch |
4 |
Log: |
5 |
Backport libpng14 patch from Qt 4.6.3. |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 x11-libs/qt-gui/files/qt-4.5.3-libpng14.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/qt-gui/files/qt-4.5.3-libpng14.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/qt-gui/files/qt-4.5.3-libpng14.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: qt-4.5.3-libpng14.patch |
15 |
=================================================================== |
16 |
--- src/gui/image/qpnghandler.cpp |
17 |
+++ src/gui/image/qpnghandler.cpp |
18 |
@@ -205,7 +205,7 @@ |
19 |
image.setColor(i, qRgba(c,c,c,0xff)); |
20 |
} |
21 |
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { |
22 |
- const int g = info_ptr->trans_values.gray; |
23 |
+ const int g = info_ptr->trans_color.gray; |
24 |
if (g < ncols) { |
25 |
image.setColor(g, 0); |
26 |
} |
27 |
@@ -234,7 +234,7 @@ |
28 |
info_ptr->palette[i].red, |
29 |
info_ptr->palette[i].green, |
30 |
info_ptr->palette[i].blue, |
31 |
- info_ptr->trans[i] |
32 |
+ info_ptr->trans_alpha[i] |
33 |
) |
34 |
); |
35 |
i++; |
36 |
@@ -454,9 +454,9 @@ |
37 |
png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) |
38 |
if (outImage->depth()==32 && png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { |
39 |
QRgb trans = 0xFF000000 | qRgb( |
40 |
- (info_ptr->trans_values.red << 8 >> bit_depth)&0xff, |
41 |
- (info_ptr->trans_values.green << 8 >> bit_depth)&0xff, |
42 |
- (info_ptr->trans_values.blue << 8 >> bit_depth)&0xff); |
43 |
+ (info_ptr->trans_color.red << 8 >> bit_depth)&0xff, |
44 |
+ (info_ptr->trans_color.green << 8 >> bit_depth)&0xff, |
45 |
+ (info_ptr->trans_color.blue << 8 >> bit_depth)&0xff); |
46 |
for (uint y=0; y<height; y++) { |
47 |
for (uint x=0; x<info_ptr->width; x++) { |
48 |
if (((uint**)jt)[y][x] == trans) { |