Ensure extractChannel sets bw colourspace interp #1257

This commit is contained in:
Lovell Fuller
2018-06-19 22:47:52 +01:00
parent da0b0348a2
commit 94607b585a
4 changed files with 22 additions and 1 deletions

View File

@@ -694,7 +694,9 @@ class PipelineWorker : public Nan::AsyncWorker {
(baton->err).append("Cannot extract channel from image. Too few channels in image.");
return Error();
}
image = image.extract_band(baton->extractChannel);
image = image
.extract_band(baton->extractChannel)
.copy(VImage::option()->set("interpretation", VIPS_INTERPRETATION_B_W));
}
// Convert image to sRGB, if not already
if (sharp::Is16Bit(image.interpretation())) {