Add support for input with 16-bit RGB profile #2037

This commit is contained in:
Lovell Fuller 2020-01-15 21:16:11 +00:00
parent 4828a17643
commit 18e1f10a94
2 changed files with 4 additions and 0 deletions

View File

@ -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.

View File

@ -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