diff --git a/libvips/foreign/vips2tiff.c b/libvips/foreign/vips2tiff.c index e26447e5..9a60aa8e 100644 --- a/libvips/foreign/vips2tiff.c +++ b/libvips/foreign/vips2tiff.c @@ -460,7 +460,7 @@ wtiff_embed_xmp( Wtiff *wtiff, TIFF *tif ) } static int -wtiff_embed_ipct( Wtiff *wtiff, TIFF *tif ) +wtiff_embed_iptc( Wtiff *wtiff, TIFF *tif ) { void *data; size_t data_length; @@ -581,7 +581,7 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer ) if( !wtiff->strip ) if( wtiff_embed_profile( wtiff, tif ) || wtiff_embed_xmp( wtiff, tif ) || - wtiff_embed_ipct( wtiff, tif ) || + wtiff_embed_iptc( wtiff, tif ) || wtiff_embed_photoshop( wtiff, tif ) || wtiff_embed_imagedescription( wtiff, tif ) ) return( -1 ); @@ -1625,7 +1625,7 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in ) if( !wtiff->strip ) if( wtiff_embed_profile( wtiff, out ) || wtiff_embed_xmp( wtiff, out ) || - wtiff_embed_ipct( wtiff, out ) || + wtiff_embed_iptc( wtiff, out ) || wtiff_embed_photoshop( wtiff, out ) || wtiff_embed_imagedescription( wtiff, out ) ) return( -1 ); diff --git a/libvips/iofuncs/header.c b/libvips/iofuncs/header.c index 3cf55256..29a6b04d 100644 --- a/libvips/iofuncs/header.c +++ b/libvips/iofuncs/header.c @@ -28,6 +28,8 @@ * - rename "field" as "name" in docs * 21/11/18 * - get_string will allow G_STRING and REF_STRING + * 28/12/18 + * - hide deprecated header fields from _map */ /* @@ -1160,9 +1162,23 @@ vips_image_remove( VipsImage *image, const char *name ) return( FALSE ); } +/* Deprecated header fields we hide from _map. + */ +static const char *vips_image_header_deprecated[] = { + "ipct-data" +}; + static void * vips_image_map_fn( VipsMeta *meta, VipsImageMapFn fn, void *a ) { + int i; + + /* Hide deprecated fields. + */ + for( i = 0; i < VIPS_NUMBER( vips_image_header_deprecated ); i++ ) + if( strcmp( meta->name, vips_image_header_deprecated[i] ) == 0 ) + return( NULL ); + return( fn( meta->im, meta->name, &meta->value, a ) ); }