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

--- 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))