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

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