diff options
author | Mark Brand <mabrand@mabrand.nl> | 2011-03-03 19:41:57 (GMT) |
---|---|---|
committer | Mark Brand <mabrand@mabrand.nl> | 2011-03-03 19:41:57 (GMT) |
commit | ff8e372e08387ced70f35a2eee842e07b8170b75 (patch) | |
tree | 982ef9aec5983a84cad495246e089820296db4c9 /src/wxwidgets-1-png.patch | |
parent | 5abd6a1b390af6acd9ee399af1594db184077ae3 (diff) | |
download | mxe-ff8e372e08387ced70f35a2eee842e07b8170b75.zip mxe-ff8e372e08387ced70f35a2eee842e07b8170b75.tar.gz mxe-ff8e372e08387ced70f35a2eee842e07b8170b75.tar.bz2 |
package wxwidgets: libpng 1.5 compatibility
Diffstat (limited to 'src/wxwidgets-1-png.patch')
-rw-r--r-- | src/wxwidgets-1-png.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/wxwidgets-1-png.patch b/src/wxwidgets-1-png.patch new file mode 100644 index 0000000..640c00e --- /dev/null +++ b/src/wxwidgets-1-png.patch @@ -0,0 +1,39 @@ +This file is part of mingw-cross-env.
+See doc/index.html for further information.
+
+http://trac.wxwidgets.org/changeset/67009
+Index: /wxWidgets/branches/WX_2_8_BRANCH/src/common/imagpng.cpp
+===================================================================
+--- a/src/common/imagpng.cpp (revision 60875)
++++ b/src/common/imagpng.cpp (revision 67009)
+@@ -530,5 +530,5 @@
+ (
+ PNG_LIBPNG_VER_STRING,
+- (voidp) NULL,
++ NULL,
+ wx_png_error,
+ wx_png_warning
+@@ -587,14 +587,17 @@
+ if (color_type == PNG_COLOR_TYPE_PALETTE)
+ {
+- const size_t ncolors = info_ptr->num_palette;
++ int ncolors = 0;
++ png_colorp palette;
++ png_get_PLTE( png_ptr, info_ptr, &palette, &ncolors);
+ unsigned char* r = new unsigned char[ncolors];
+ unsigned char* g = new unsigned char[ncolors];
+ unsigned char* b = new unsigned char[ncolors];
+-
+- for (size_t j = 0; j < ncolors; j++)
++ int j;
++
++ for (j = 0; j < ncolors; j++)
+ {
+- r[j] = info_ptr->palette[j].red;
+- g[j] = info_ptr->palette[j].green;
+- b[j] = info_ptr->palette[j].blue;
++ r[j] = palette[j].red;
++ g[j] = palette[j].green;
++ b[j] = palette[j].blue;
+ }
+
|