From bd377438b6eb9d4451fe42e69b6b772fe621ceaa Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 12 Jan 2019 18:13:43 +0000 Subject: [PATCH] Ignore colour profiles in LAB images as they are already LAB --- src/pipeline.cc | 2 +- test/unit/resize-contain.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipeline.cc b/src/pipeline.cc index b43b1c0c..74383f07 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -297,7 +297,7 @@ class PipelineWorker : public Nan::AsyncWorker { } // Ensure we're using a device-independent colour space - if (sharp::HasProfile(image)) { + if (sharp::HasProfile(image) && image.interpretation() != VIPS_INTERPRETATION_LABS) { // Convert to sRGB using embedded profile try { image = image.icc_transform( diff --git a/test/unit/resize-contain.js b/test/unit/resize-contain.js index af7604e5..d443ed2a 100644 --- a/test/unit/resize-contain.js +++ b/test/unit/resize-contain.js @@ -116,7 +116,7 @@ describe('Resize fit=contain', function () { }); }); - it.skip('TIFF in LAB colourspace onto RGBA background', function (done) { + it('TIFF in LAB colourspace onto RGBA background', function (done) { sharp(fixtures.inputTiffCielab) .resize(64, 128, { fit: 'contain',