hide deprecated header fields from _map
just the annoying ipct-data for now
This commit is contained in:
parent
9c73539258
commit
fe2c8505d6
@ -460,7 +460,7 @@ wtiff_embed_xmp( Wtiff *wtiff, TIFF *tif )
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
wtiff_embed_ipct( Wtiff *wtiff, TIFF *tif )
|
wtiff_embed_iptc( Wtiff *wtiff, TIFF *tif )
|
||||||
{
|
{
|
||||||
void *data;
|
void *data;
|
||||||
size_t data_length;
|
size_t data_length;
|
||||||
@ -581,7 +581,7 @@ wtiff_write_header( Wtiff *wtiff, Layer *layer )
|
|||||||
if( !wtiff->strip )
|
if( !wtiff->strip )
|
||||||
if( wtiff_embed_profile( wtiff, tif ) ||
|
if( wtiff_embed_profile( wtiff, tif ) ||
|
||||||
wtiff_embed_xmp( wtiff, tif ) ||
|
wtiff_embed_xmp( wtiff, tif ) ||
|
||||||
wtiff_embed_ipct( wtiff, tif ) ||
|
wtiff_embed_iptc( wtiff, tif ) ||
|
||||||
wtiff_embed_photoshop( wtiff, tif ) ||
|
wtiff_embed_photoshop( wtiff, tif ) ||
|
||||||
wtiff_embed_imagedescription( wtiff, tif ) )
|
wtiff_embed_imagedescription( wtiff, tif ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
@ -1625,7 +1625,7 @@ wtiff_copy_tiff( Wtiff *wtiff, TIFF *out, TIFF *in )
|
|||||||
if( !wtiff->strip )
|
if( !wtiff->strip )
|
||||||
if( wtiff_embed_profile( wtiff, out ) ||
|
if( wtiff_embed_profile( wtiff, out ) ||
|
||||||
wtiff_embed_xmp( wtiff, out ) ||
|
wtiff_embed_xmp( wtiff, out ) ||
|
||||||
wtiff_embed_ipct( wtiff, out ) ||
|
wtiff_embed_iptc( wtiff, out ) ||
|
||||||
wtiff_embed_photoshop( wtiff, out ) ||
|
wtiff_embed_photoshop( wtiff, out ) ||
|
||||||
wtiff_embed_imagedescription( wtiff, out ) )
|
wtiff_embed_imagedescription( wtiff, out ) )
|
||||||
return( -1 );
|
return( -1 );
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
* - rename "field" as "name" in docs
|
* - rename "field" as "name" in docs
|
||||||
* 21/11/18
|
* 21/11/18
|
||||||
* - get_string will allow G_STRING and REF_STRING
|
* - 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 );
|
return( FALSE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Deprecated header fields we hide from _map.
|
||||||
|
*/
|
||||||
|
static const char *vips_image_header_deprecated[] = {
|
||||||
|
"ipct-data"
|
||||||
|
};
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
vips_image_map_fn( VipsMeta *meta, VipsImageMapFn fn, void *a )
|
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 ) );
|
return( fn( meta->im, meta->name, &meta->value, a ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user