mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Ensure extend op stays sequential when copying px #3928
This commit is contained in:
@@ -73,6 +73,20 @@ describe('Extend', function () {
|
||||
});
|
||||
});
|
||||
|
||||
it('extend top with mirroring uses ordered read', async () => {
|
||||
const data = await sharp(fixtures.inputJpg)
|
||||
.extend({
|
||||
extendWith: 'mirror',
|
||||
top: 1
|
||||
})
|
||||
.png({ compressionLevel: 0 })
|
||||
.toBuffer();
|
||||
|
||||
const { width, height } = await sharp(data).metadata();
|
||||
assert.strictEqual(2725, width);
|
||||
assert.strictEqual(2226, height);
|
||||
});
|
||||
|
||||
it(`extend sides unequally with RGBA (${extendWith})`, function (done) {
|
||||
sharp(fixtures.inputPngWithTransparency16bit)
|
||||
.resize(120)
|
||||
|
||||
Reference in New Issue
Block a user