1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
This file is part of mingw-cross-env.
See doc/index.html for further information.
Posted 4 March 2011 on:
https://mailhost.informatik.uni-hamburg.de/pipermail/vigra/
diff --git a/src/impex/png.cxx b/src/impex/png.cxx
index 23786ef..08822bd 100644
--- a/src/impex/png.cxx
+++ b/src/impex/png.cxx
@@ -320,7 +320,11 @@ namespace vigra {
#if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED)
char * dummyName;
int dummyCompType;
+#if (PNG_LIBPNG_VER < 10500)
char * profilePtr;
+#else
+ png_byte * profilePtr;
+#endif
png_uint_32 profileLen;
if (png_get_valid( png, info, PNG_INFO_iCCP )) {
png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ;
@@ -592,7 +596,11 @@ namespace vigra {
// set icc profile
if (iccProfile.size() > 0) {
png_set_iCCP(png, info, (png_charp)("icc"), 0,
+#if (PNG_LIBPNG_VER < 10500)
(png_charp)iccProfile.begin(), (png_uint_32)iccProfile.size());
+#else
+ (png_byte*)iccProfile.begin(), (png_uint_32)iccProfile.size());
+#endif
}
#endif
|