From b8a6a9d9b50c319ccd002e98ac50980dc9f3a5e6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 14 Mar 2012 11:57:13 +0000 Subject: [PATCH 1/2] fix compiler warning --- libvips/foreign/vipspng.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index 73568c1e..7900f4ad 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -189,7 +189,15 @@ png2vips_header( Read *read, VipsImage *out ) png_charp name; int compression_type; + + /* Well thank you, libpng. + */ +#if PNG_LIBPNG_VER < 10400 + png_charp profile; +#else png_bytep profile; +#endif + png_uint_32 proflen; int bands; From d8000bb1b58e1e95c685bf4908238d19e278e14d Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 17 Mar 2012 17:57:46 +0000 Subject: [PATCH 2/2] tiffsave xres/yres args broken the declarations for xres/yres tiff args were all wrong --- ChangeLog | 1 + libvips/foreign/tiffsave.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2c43b74..4b99f575 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ 13/3/12 started 7.28.2 +- xres/yres tiffsave args were broken 13/3/12 started 7.28.1 - add ICC profile read/write for png files diff --git a/libvips/foreign/tiffsave.c b/libvips/foreign/tiffsave.c index 6bccf9f1..2bb33b83 100644 --- a/libvips/foreign/tiffsave.c +++ b/libvips/foreign/tiffsave.c @@ -2,6 +2,8 @@ * * 2/12/11 * - wrap a class around the tiff writer + * 17/3/12 + * - argh xres/yres macro was wrong */ /* @@ -248,15 +250,15 @@ vips_foreign_save_tiff_class_init( VipsForeignSaveTiffClass *class ) VIPS_ARG_DOUBLE( class, "xres", 16, _( "Xres" ), _( "Horizontal resolution in pixels/mm" ), - VIPS_ARGUMENT_NONE, - G_STRUCT_OFFSET( VipsImage, Xres ), + VIPS_ARGUMENT_OPTIONAL_INPUT, + G_STRUCT_OFFSET( VipsForeignSaveTiff, xres ), -0.0, 1000000, 0 ); VIPS_ARG_DOUBLE( class, "yres", 17, _( "Yres" ), _( "Vertical resolution in pixels/mm" ), - VIPS_ARGUMENT_NONE, - G_STRUCT_OFFSET( VipsImage, Yres ), + VIPS_ARGUMENT_OPTIONAL_INPUT, + G_STRUCT_OFFSET( VipsForeignSaveTiff, yres ), -0.0, 1000000, 0 ); VIPS_ARG_BOOL( class, "bigtiff", 18,