mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Keep output dimensions within WebP 14-bit range
This commit is contained in:
@@ -176,7 +176,7 @@ describe('Image metadata', function() {
|
||||
assert.strictEqual(3, metadata.channels);
|
||||
assert.strictEqual(false, metadata.hasProfile);
|
||||
assert.strictEqual(false, metadata.hasAlpha);
|
||||
image.resize(metadata.width / 2).toBuffer(function(err, data, info) {
|
||||
image.resize(Math.floor(metadata.width / 2)).toBuffer(function(err, data, info) {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(true, data.length > 0);
|
||||
assert.strictEqual(1362, info.width);
|
||||
|
||||
Reference in New Issue
Block a user