PNG loader: attach palette bit depth, if any, as metadata

This commit is contained in:
Lovell Fuller 2019-01-01 15:26:35 +00:00
parent f611845698
commit 7854ead877
1 changed files with 5 additions and 0 deletions

View File

@ -490,6 +490,11 @@ png2vips_header( Read *read, VipsImage *out )
return( -1 );
}
/* Attach original palette bit depth, if any, as metadata.
*/
if( color_type == PNG_COLOR_TYPE_PALETTE )
vips_image_set_int( out, "palette-bit-depth", bit_depth );
return( 0 );
}