Merge pull request #1199 from lovell/png-header-palette-bit-depth
PNG loader: attach palette bit depth, if any, as metadata
This commit is contained in:
commit
2b8db2e594
@ -490,6 +490,11 @@ png2vips_header( Read *read, VipsImage *out )
|
|||||||
return( -1 );
|
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 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user