Fix 16-bit, 2-channel PNG w/ ICC profile support #2013

This commit is contained in:
Lovell Fuller
2019-12-20 17:19:33 +00:00
parent 703d90e663
commit 755a0caf3d
6 changed files with 20 additions and 1 deletions

View File

@@ -311,7 +311,11 @@ class PipelineWorker : public Nan::AsyncWorker {
}
// Ensure we're using a device-independent colour space
if (sharp::HasProfile(image) && image.interpretation() != VIPS_INTERPRETATION_LABS) {
if (
sharp::HasProfile(image) &&
image.interpretation() != VIPS_INTERPRETATION_LABS &&
image.interpretation() != VIPS_INTERPRETATION_GREY16
) {
// Convert to sRGB using embedded profile
try {
image = image.icc_transform("srgb", VImage::option()