35 lines
1.4 KiB
Text
35 lines
1.4 KiB
Text
--- plugins/output-pngfile/output-pngfile.c
|
|
+++ plugins/output-pngfile/output-pngfile.c
|
|
@@ -23,6 +23,7 @@
|
|
#include <gettext.h>
|
|
#include "config.h"
|
|
#include <png.h>
|
|
+#include <zlib.h>
|
|
|
|
#define RS_TYPE_PNGFILE (rs_pngfile_type)
|
|
#define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile))
|
|
@@ -198,7 +199,7 @@
|
|
rs_icc_profile_get_data(profile, &data, &data_length);
|
|
|
|
// FIXME: Insert correct profile name
|
|
- png_set_iCCP(png_ptr, info_ptr, "Profile name", PNG_COMPRESSION_TYPE_BASE, data, data_length);
|
|
+ png_set_iCCP(png_ptr, info_ptr, "Profile name", PNG_COMPRESSION_TYPE_BASE, (png_const_bytep)data, data_length);
|
|
if (pngfile->save16bit)
|
|
png_set_gAMA(png_ptr, info_ptr, 1.0);
|
|
}
|
|
--- plugins/load-gdk/exiv2-colorspace.cpp
|
|
+++ plugins/load-gdk/exiv2-colorspace.cpp
|
|
@@ -125,11 +125,11 @@
|
|
|
|
int compression_type;
|
|
/* Extract embedded ICC profile */
|
|
- if (info_ptr->valid & PNG_INFO_iCCP)
|
|
+ if (png_get_valid(png_ptr, info_ptr, TRUE) & PNG_INFO_iCCP)
|
|
{
|
|
png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr,
|
|
(png_charpp) &icc_profile_title, &compression_type,
|
|
- (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size);
|
|
+ (png_byte**) &icc_profile, (png_uint_32*) &icc_profile_size);
|
|
if (retval != 0)
|
|
{
|
|
RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE);
|