mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ability to disable limitInputPixels #250
Update docs Added a giant image for testing Adding myself to contributors Added tests to verify giant image can be opened Extend test-win time limit (because of large images)
This commit is contained in:
committed by
Lovell Fuller
parent
b2d7d4c4a9
commit
8c9c070caf
@@ -158,7 +158,8 @@ class PipelineWorker : public AsyncWorker {
|
||||
}
|
||||
|
||||
// Limit input images to a given number of pixels, where pixels = width * height
|
||||
if (image.width() * image.height() > baton->limitInputPixels) {
|
||||
// Ignore if 0
|
||||
if (baton->limitInputPixels > 0 && image.width() * image.height() > baton->limitInputPixels) {
|
||||
(baton->err).append("Input image exceeds pixel limit");
|
||||
return Error();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user