Prevent over-compute in affine rotate #3722

This commit is contained in:
Lovell Fuller
2023-07-09 09:04:07 +01:00
parent 0da55bab7e
commit 14c3346800
3 changed files with 20 additions and 1 deletions

View File

@@ -473,4 +473,20 @@ describe('Rotation', function () {
assert.strictEqual(g, 64);
assert.strictEqual(b, 30);
});
it('Resize after affine-based rotation does not overcompute', async () =>
sharp({
create: {
width: 4640,
height: 2610,
channels: 3,
background: 'black'
}
})
.rotate(28)
.resize({ width: 640, height: 360 })
.raw()
.timeout({ seconds: 5 })
.toBuffer()
);
});