mirror of
https://github.com/lovell/sharp.git
synced 2026-02-08 15:46:16 +01:00
Add failOnError option to fail-fast on bad input image data (#976)
This commit is contained in:
committed by
Lovell Fuller
parent
382d476271
commit
b4d72bd544
@@ -249,7 +249,9 @@ class PipelineWorker : public Nan::AsyncWorker {
|
||||
}
|
||||
if (shrink_on_load > 1) {
|
||||
// Reload input using shrink-on-load
|
||||
vips::VOption *option = VImage::option()->set("shrink", shrink_on_load);
|
||||
vips::VOption *option = VImage::option()
|
||||
->set("shrink", shrink_on_load)
|
||||
->set("fail", baton->input->failOnError);
|
||||
if (baton->input->buffer != nullptr) {
|
||||
VipsBlob *blob = vips_blob_new(nullptr, baton->input->buffer, baton->input->bufferLength);
|
||||
if (inputImageType == ImageType::JPEG) {
|
||||
|
||||
Reference in New Issue
Block a user