libqt3/libqt-3.3.8b-png14.patch

28 lines
889 B
Diff

diff -ru qt-x11-free-3.3.8b-orig//src/kernel/qpngio.cpp qt-x11-free-3.3.8b/src/kernel/qpngio.cpp
--- qt-x11-free-3.3.8b-orig//src/kernel/qpngio.cpp 2008-01-15 14:09:13.000000000 -0500
+++ qt-x11-free-3.3.8b/src/kernel/qpngio.cpp 2010-05-13 01:22:17.295436061 -0400
@@ -162,7 +162,11 @@
image.setColor( i, qRgba(c,c,c,0xff) );
}
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
+#if PNG_LIBPNG_VER < 10400
const int g = info_ptr->trans_values.gray;
+#else
+ const int g = info_ptr->trans_color.gray;
+#endif
if (g < ncols) {
image.setAlphaBuffer(TRUE);
image.setColor(g, image.color(g) & RGB_MASK);
@@ -190,7 +194,11 @@
info_ptr->palette[i].red,
info_ptr->palette[i].green,
info_ptr->palette[i].blue,
+#if PNG_LIBPNG_VER < 10400
info_ptr->trans[i]
+#else
+ info_ptr->trans_alpha[i]
+#endif
)
);
i++;