summaryrefslogtreecommitdiff
path: root/misc/celestia/patches/patch-ap
blob: 4b74bb5dd3addfd66e4e72869a94ac7403ed0778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ap,v 1.2 2010/06/20 15:05:43 wiz Exp $

https://sourceforge.net/tracker/?func=detail&aid=3018741&group_id=21302&atid=121302

--- src/celengine/image.cpp.orig	2005-07-19 20:30:54.000000000 +0000
+++ src/celengine/image.cpp
@@ -78,7 +78,7 @@ using namespace std;
 // Define various expansion transformations for old versions of libpng
 #if PNG_LIBPNG_VER < 10004
 #define png_set_palette_to_rgb(p)  png_set_expand(p)
-#define png_set_gray_1_2_4_to_8(p) png_set_expand(p)
+#define png_set_expand_gray_1_2_4_to_8(p) png_set_expand(p)
 #define png_set_tRNS_to_alpha(p)   png_set_expand(p)
 #endif // PNG_LIBPNG_VER < 10004
 
@@ -720,7 +720,7 @@ Image* LoadPNGImage(const string& filena
 
     if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
     {
-        png_set_gray_1_2_4_to_8(png_ptr);
+        png_set_expand_gray_1_2_4_to_8(png_ptr);
     }
 
     if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))