Merge pull request #1207 from lovell/png-strip-xmp
PNG writer: ensure XMP metadata is ignored when strip=TRUE
This commit is contained in:
commit
3de9f896ac
@ -1067,10 +1067,12 @@ write_vips( Write *write,
|
||||
VIPS_RINT( in->Xres * 1000 ), VIPS_RINT( in->Yres * 1000 ),
|
||||
PNG_RESOLUTION_METER );
|
||||
|
||||
/* Metadata
|
||||
*/
|
||||
if( !strip ) {
|
||||
/* Set ICC Profile.
|
||||
*/
|
||||
if( profile &&
|
||||
!strip ) {
|
||||
if( profile ) {
|
||||
if( strcmp( profile, "none" ) != 0 ) {
|
||||
void *data;
|
||||
size_t length;
|
||||
@ -1089,8 +1091,7 @@ write_vips( Write *write,
|
||||
PNG_COMPRESSION_TYPE_BASE, data, length );
|
||||
}
|
||||
}
|
||||
else if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) &&
|
||||
!strip ) {
|
||||
else if( vips_image_get_typeof( in, VIPS_META_ICC_NAME ) ) {
|
||||
void *data;
|
||||
size_t length;
|
||||
|
||||
@ -1131,6 +1132,7 @@ write_vips( Write *write,
|
||||
if( vips_image_map( in,
|
||||
write_png_comment, write ) )
|
||||
return( -1 );
|
||||
}
|
||||
|
||||
#ifdef HAVE_IMAGEQUANT
|
||||
if( palette ) {
|
||||
|
Loading…
Reference in New Issue
Block a user