mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 21:56:18 +01:00
Ensure embedded profile, if any, is always used
Perform sRGB conversion at end of pipe only withMetadata exports profile, should not convert Convert one fixture to sRGB to help test Discovered while investigating #125
This commit is contained in:
@@ -117,6 +117,13 @@ namespace sharp {
|
||||
return image;
|
||||
}
|
||||
|
||||
/*
|
||||
Does this image have an embedded profile?
|
||||
*/
|
||||
bool HasProfile(VipsImage *image) {
|
||||
return (vips_image_get_typeof(image, VIPS_META_ICC_NAME) > 0) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
Does this image have an alpha channel?
|
||||
Uses colour space interpretation with number of channels to guess this.
|
||||
|
||||
Reference in New Issue
Block a user