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
@@ -876,6 +876,24 @@ describe('Input/output', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('Disabling limit works', function(done) {
|
||||
sharp(fixtures.inputPngLarge)
|
||||
.limitInputPixels(false)
|
||||
.toBuffer(function(err) {
|
||||
assert.strictEqual(true, !err);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('Enabling default limit fails works and fails with a large image', function(done) {
|
||||
sharp(fixtures.inputPngLarge)
|
||||
.limitInputPixels(true)
|
||||
.toBuffer(function(err) {
|
||||
assert.strictEqual(true, !!err);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('Smaller than input fails', function(done) {
|
||||
sharp(fixtures.inputJpg).metadata(function(err, metadata) {
|
||||
if (err) throw err;
|
||||
|
||||
Reference in New Issue
Block a user