]> git.pld-linux.org Git - packages/OpenSceneGraph.git/blob - OpenSceneGraph-libpng.patch
- up to 2.8.3
[packages/OpenSceneGraph.git] / OpenSceneGraph-libpng.patch
1 --- OpenSceneGraph-2.8.2/src/osgPlugins/png/ReaderWriterPNG.cpp~        2008-07-14 00:18:59.000000000 +0200
2 +++ OpenSceneGraph-2.8.2/src/osgPlugins/png/ReaderWriterPNG.cpp 2010-03-01 12:57:05.720365671 +0100
3 @@ -173,7 +173,11 @@
4                  endinfo = png_create_info_struct(png);
5  
6                  fin.read((char*)header,8);
7 -                if (fin.gcount() == 8 && png_check_sig(header, 8))
8 +               #if PNG_LIBPNG_VER < 10400
9 +                       if (fin.gcount() == 8 && png_check_sig(header, 8))
10 +                #else
11 +                       if (fin.gcount() == 8 && png_sig_cmp(header, 0, 8))
12 +                #endif
13                      png_set_read_fn(png,&fin,png_read_istream); //Use custom read function that will get data from istream
14                  else
15                  {
16 @@ -224,7 +228,11 @@
17                  if (color == PNG_COLOR_TYPE_PALETTE)
18                      png_set_palette_to_rgb(png);
19                  if (color == PNG_COLOR_TYPE_GRAY && depth < 8)
20 -                    png_set_gray_1_2_4_to_8(png);
21 +                   #if PNG_LIBPNG_VER < 10400
22 +                       png_set_gray_1_2_4_to_8(png);
23 +                   #else
24 +                       png_set_expand_gray_1_2_4_to_8(png);
25 +                   #endif
26                  if (png_get_valid(png, info, PNG_INFO_tRNS))
27                      png_set_tRNS_to_alpha(png);
28  
This page took 0.082085 seconds and 3 git commands to generate.