mirror of
https://github.com/lovell/sharp.git
synced 2026-02-05 22:26:20 +01:00
Add AVIF/HEIF 'tune' option to control quality metrics #4227
This commit is contained in:
@@ -96,4 +96,14 @@ describe('HEIF', () => {
|
||||
sharp().heif({ compression: 'av1', bitdepth: 11 });
|
||||
}, /Error: Expected 8, 10 or 12 for bitdepth but received 11 of type number/);
|
||||
});
|
||||
it('valid tune does not throw an error', () => {
|
||||
assert.doesNotThrow(() => {
|
||||
sharp().heif({ compression: 'hevc', tune: 'psnr' });
|
||||
});
|
||||
});
|
||||
it('invalid tune should throw an error', () => {
|
||||
assert.throws(() => {
|
||||
sharp().heif({ compression: 'hevc', tune: 'fail' });
|
||||
}, /Error: Expected one of: psnr, ssim, iq for tune but received fail of type string/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user