mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add pageHeight and pages to anim output response #3411
This commit is contained in:
@@ -39,7 +39,7 @@ describe('GIF input', () => {
|
||||
})
|
||||
);
|
||||
|
||||
it('Animated GIF first page to PNG', () =>
|
||||
it('Animated GIF first page to non-animated GIF', () =>
|
||||
sharp(fixtures.inputGifAnimated)
|
||||
.toBuffer({ resolveWithObject: true })
|
||||
.then(({ data, info }) => {
|
||||
@@ -49,10 +49,12 @@ describe('GIF input', () => {
|
||||
assert.strictEqual(80, info.width);
|
||||
assert.strictEqual(80, info.height);
|
||||
assert.strictEqual(4, info.channels);
|
||||
assert.strictEqual(undefined, info.pages);
|
||||
assert.strictEqual(undefined, info.pageHeight);
|
||||
})
|
||||
);
|
||||
|
||||
it('Animated GIF all pages to PNG "toilet roll"', () =>
|
||||
it('Animated GIF round trip', () =>
|
||||
sharp(fixtures.inputGifAnimated, { pages: -1 })
|
||||
.toBuffer({ resolveWithObject: true })
|
||||
.then(({ data, info }) => {
|
||||
@@ -62,6 +64,8 @@ describe('GIF input', () => {
|
||||
assert.strictEqual(80, info.width);
|
||||
assert.strictEqual(2400, info.height);
|
||||
assert.strictEqual(4, info.channels);
|
||||
assert.strictEqual(30, info.pages);
|
||||
assert.strictEqual(80, info.pageHeight);
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user