From b8a6a9d9b50c319ccd002e98ac50980dc9f3a5e6 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 14 Mar 2012 11:57:13 +0000 Subject: [PATCH 1/3] 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 2e0510f2bf360c3bd8c71699c5dd255419a660dc Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 16 Mar 2012 16:49:31 +0000 Subject: [PATCH 2/3] sync --- libvips/foreign/tiff2vips.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libvips/foreign/tiff2vips.c b/libvips/foreign/tiff2vips.c index 212d16c5..74b21428 100644 --- a/libvips/foreign/tiff2vips.c +++ b/libvips/foreign/tiff2vips.c @@ -884,7 +884,7 @@ parse_resolution( TIFF *tiff, VipsImage *out ) return( 0 ); } -/* Look at PhotometricInterpretation and BitsPerPixel, and try to figure out +/* Look at PhotometricInterpretation and BitsPerPixel and try to figure out * which of the image classes this is. */ static int @@ -1143,7 +1143,7 @@ tiff_fill_region_aligned( VipsRegion *out, void *seq, void *a, void *b ) return( 0 ); } -/* Loop over the output region, painting in tiles from the file. +/* Loop over the output region painting in tiles from the file. */ static int tiff_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) @@ -1163,7 +1163,7 @@ tiff_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) /* Sizeof a pel in the TIFF file. This won't work for formats which * are <1 byte per pel, like onebit :-( Fortunately, it's only used - * to calculate addresses within a tile, and because we are wrapped in + * to calculate addresses within a tile and, because we are wrapped in * vips_tilecache(), we will never have to calculate positions not * within a tile. */ @@ -1172,7 +1172,7 @@ tiff_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) int x, y, z; /* Special case: we are filling a single tile exactly sized to match - * the tiff tile, and we have no repacking to do for this format. + * the tiff tile and we have no repacking to do for this format. */ if( rtiff->memcpy && r->left % rtiff->twidth == 0 && @@ -1203,7 +1203,7 @@ tiff_fill_region( VipsRegion *out, void *seq, void *a, void *b, gboolean *stop ) */ vips_rect_intersectrect( &tile, r, &hit ); - /* Unpack to VIPS format. We can do this in parallel. + /* Unpack to VIPS format. * Just unpack the section of the tile we need. */ for( z = 0; z < hit.height; z++ ) { From d8000bb1b58e1e95c685bf4908238d19e278e14d Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 17 Mar 2012 17:57:46 +0000 Subject: [PATCH 3/3] 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,