diff --git a/test/fixtures/giant-image.jpg b/test/fixtures/giant-image.jpg new file mode 100644 index 00000000..badb5918 Binary files /dev/null and b/test/fixtures/giant-image.jpg differ diff --git a/test/fixtures/giant-image.png b/test/fixtures/giant-image.png deleted file mode 100644 index 92c08a77..00000000 Binary files a/test/fixtures/giant-image.png and /dev/null differ diff --git a/test/fixtures/index.js b/test/fixtures/index.js index 04839b7a..73c0681e 100644 --- a/test/fixtures/index.js +++ b/test/fixtures/index.js @@ -66,6 +66,7 @@ module.exports = { inputJpgWithCmykNoProfile: getPath('Channel_digital_image_CMYK_color_no_profile.jpg'), inputJpgWithCorruptHeader: getPath('corrupt-header.jpg'), inputJpgWithLowContrast: getPath('low-contrast.jpg'), // http://www.flickr.com/photos/grizdave/2569067123/ + inputJpgLarge: getPath('giant-image.jpg'), inputPng: getPath('50020484-00001.png'), // http://c.searspartsdirect.com/lis_png/PLDM/50020484-00001.png inputPngWithTransparency: getPath('blackbug.png'), // public domain @@ -79,7 +80,6 @@ module.exports = { inputPngOverlayLayer2LowAlpha: getPath('alpha-layer-2-ink-low-alpha.png'), inputPngAlphaPremultiplicationSmall: getPath('alpha-premultiply-1024x768-paper.png'), inputPngAlphaPremultiplicationLarge: getPath('alpha-premultiply-2048x1536-paper.png'), - inputPngLarge: getPath('giant-image.png'), inputWebP: getPath('4.webp'), // http://www.gstatic.com/webp/gallery/4.webp inputWebPWithTransparency: getPath('5_webp_a.webp'), // http://www.gstatic.com/webp/gallery3/5_webp_a.webp diff --git a/test/unit/io.js b/test/unit/io.js index e94f98c8..c112971b 100644 --- a/test/unit/io.js +++ b/test/unit/io.js @@ -877,7 +877,7 @@ describe('Input/output', function() { }); it('Disabling limit works', function(done) { - sharp(fixtures.inputPngLarge) + sharp(fixtures.inputJpgLarge) .limitInputPixels(false) .resize(2) .toBuffer(function(err) { @@ -886,8 +886,8 @@ describe('Input/output', function() { }); }); - it('Enabling default limit fails works and fails with a large image', function(done) { - sharp(fixtures.inputPngLarge) + it('Enabling default limit works and fails with a large image', function(done) { + sharp(fixtures.inputJpgLarge) .limitInputPixels(true) .toBuffer(function(err) { assert.strictEqual(true, !!err);