Ensure sharp.format lists support for raw input #220

This commit is contained in:
Lovell Fuller
2016-02-11 18:12:51 +00:00
parent a9eb65c462
commit 6ca2a4a9cd
3 changed files with 13 additions and 8 deletions

View File

@@ -752,7 +752,7 @@ class PipelineWorker : public AsyncWorker {
area->free_fn = nullptr;
vips_area_unref(area);
baton->formatOut = "webp";
} else if (baton->formatOut == "raw") {
} else if (baton->formatOut == "raw" || (baton->formatOut == "input" && inputImageType == ImageType::RAW)) {
// Write raw, uncompressed image data to buffer
if (baton->greyscale || image.interpretation() == VIPS_INTERPRETATION_B_W) {
// Extract first band for greyscale image