From 21a960796c769263e66f45f9ee1795d31be0272e Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Mon, 28 Feb 2022 11:28:08 +0000 Subject: [PATCH] Ignore greyscale ICC profiles due to lcms bug #3112 --- docs/changelog.md | 3 +++ src/pipeline.cc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index e744e2fdb..246d5ed10 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -16,6 +16,9 @@ Requires libvips v8.12.2 [#3110](https://github.com/lovell/sharp/pull/3110) [@kleisauke](https://github.com/kleisauke) +* Temporarily ignore greyscale ICC profiles to workaround lcms bug. + [#3112](https://github.com/lovell/sharp/issues/3112) + ### v0.30.1 - 9th February 2022 * Allow use of `toBuffer` and `toFile` on the same instance. diff --git a/src/pipeline.cc b/src/pipeline.cc index b2c2b3a7b..2289dd215 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -292,7 +292,8 @@ class PipelineWorker : public Napi::AsyncWorker { if ( sharp::HasProfile(image) && image.interpretation() != VIPS_INTERPRETATION_LABS && - image.interpretation() != VIPS_INTERPRETATION_GREY16 + image.interpretation() != VIPS_INTERPRETATION_GREY16 && + image.interpretation() != VIPS_INTERPRETATION_B_W ) { // Convert to sRGB/P3 using embedded profile try {