34 lines
1.2 KiB
Text
34 lines
1.2 KiB
Text
$NetBSD: patch-ap,v 1.3 2013/02/17 09:39:09 dholland Exp $
|
|
|
|
https://sourceforge.net/tracker/?func=detail&aid=3018741&group_id=21302&atid=121302
|
|
|
|
Also, add <cstring> to fix build with png 1.6.
|
|
|
|
--- src/celengine/image.cpp.orig 2005-07-19 20:30:54.000000000 +0000
|
|
+++ src/celengine/image.cpp
|
|
@@ -7,6 +7,7 @@
|
|
// as published by the Free Software Foundation; either version 2
|
|
// of the License, or (at your option) any later version.
|
|
|
|
+#include <cstring>
|
|
#include <fstream>
|
|
|
|
#ifndef MACOSX
|
|
@@ -78,7 +79,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 +721,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))
|