Improve multi-frame image resizing (#2789)

* Ports vips_thumbnail logic to sharp 
* Deprecates the pageHeight output option for WebP/GIF
This commit is contained in:
Kleis Auke Wolthuizen
2021-12-10 21:32:04 +01:00
committed by GitHub
parent 659cdabd8e
commit 513fb40f40
29 changed files with 619 additions and 334 deletions

View File

@@ -80,12 +80,6 @@ describe('GIF input', () => {
assert.strictEqual(true, reduced.length < original.length);
});
it('invalid pageHeight throws', () => {
assert.throws(() => {
sharp().gif({ pageHeight: 0 });
});
});
it('invalid loop throws', () => {
assert.throws(() => {
sharp().gif({ loop: -1 });
@@ -97,7 +91,7 @@ describe('GIF input', () => {
it('invalid delay throws', () => {
assert.throws(() => {
sharp().gif({ delay: [-1] });
sharp().gif({ delay: -1 });
});
assert.throws(() => {
sharp().gif({ delay: [65536] });