From 18e1f10a9475df7aff9d238839b265aae18e4900 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 15 Jan 2020 21:16:11 +0000 Subject: [PATCH] Add support for input with 16-bit RGB profile #2037 --- docs/changelog.md | 3 +++ src/pipeline.cc | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/changelog.md b/docs/changelog.md index 778d2032..1c89aee4 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -27,6 +27,9 @@ Requires libvips v8.9.0. [#2024](https://github.com/lovell/sharp/pull/2024) [@BrychanOdlum](https://github.com/BrychanOdlum) +* Add support for input with 16-bit RGB profile. + [#2037](https://github.com/lovell/sharp/issues/2037) + ## v0.23 - "*vision*" Requires libvips v8.8.1. diff --git a/src/pipeline.cc b/src/pipeline.cc index 395ea90a..4745c4be 100644 --- a/src/pipeline.cc +++ b/src/pipeline.cc @@ -308,6 +308,7 @@ class PipelineWorker : public Nan::AsyncWorker { try { image = image.icc_transform("srgb", VImage::option() ->set("embedded", TRUE) + ->set("depth", image.interpretation() == VIPS_INTERPRETATION_RGB16 ? 16 : 8) ->set("intent", VIPS_INTENT_PERCEPTUAL)); } catch(...) { // Ignore failure of embedded profile