view src/openscenegraph-4-png.patch @ 721:bc69ccf2503c

use explicitly "patch -u" to avoid warnings about guessing the patch type
author Volker Grabsch <vog@notjusthosting.com>
date Thu, 11 Feb 2010 09:17:28 +0100
parents 29f1ba4559ae
children
line wrap: on
line source

This file is part of mingw-cross-env.
See doc/index.html for further information.

--- OpenSceneGraph-2.8.2.orig/src/osgPlugins/png/ReaderWriterPNG.cpp
+++ OpenSceneGraph-2.8.2/src/osgPlugins/png/ReaderWriterPNG.cpp
@@ -179,5 +179,5 @@
 
                 fin.read((char*)header,8);
-                if (fin.gcount() == 8 && png_check_sig(header, 8))
+                if (fin.gcount() == 8 && png_sig_cmp(header, 0, 8) == 0)
                     png_set_read_fn(png,&fin,png_read_istream); //Use custom read function that will get data from istream
                 else
@@ -230,5 +230,5 @@
                     png_set_palette_to_rgb(png);
                 if (color == PNG_COLOR_TYPE_GRAY && depth < 8)
-                    png_set_gray_1_2_4_to_8(png);
+                    png_set_expand_gray_1_2_4_to_8(png);
                 if (png_get_valid(png, info, PNG_INFO_tRNS))
                     png_set_tRNS_to_alpha(png);