Ignore colour profiles in LAB images as they are already LAB

This commit is contained in:
Lovell Fuller 2019-01-12 18:13:43 +00:00
parent 9dd6510de6
commit bd377438b6
2 changed files with 2 additions and 2 deletions

View File

@ -297,7 +297,7 @@ class PipelineWorker : public Nan::AsyncWorker {
} }
// Ensure we're using a device-independent colour space // 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 // Convert to sRGB using embedded profile
try { try {
image = image.icc_transform( image = image.icc_transform(

View File

@ -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) sharp(fixtures.inputTiffCielab)
.resize(64, 128, { .resize(64, 128, {
fit: 'contain', fit: 'contain',