Correct shrink calc, regression introduced in e398b47 #831

This commit is contained in:
Lovell Fuller
2017-05-30 17:16:41 +01:00
parent c879df3b31
commit 9e39a7fa95
3 changed files with 18 additions and 1 deletions

View File

@@ -412,4 +412,15 @@ describe('Resize dimensions', function () {
sharp().resize(32, 24, { centreSampling: 1 });
});
});
it('Dimensions that result in differing shrinks on each axis', function () {
return sharp(fixtures.inputJpg)
.resize(645, 399)
.toBuffer()
.then(function (data) {
return sharp(data)
.resize(150, 100)
.toBuffer();
});
});
});