mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add bitdepth option to heif output (#4036)
Prebuilt binaries support only AVIF with a bitdepth of 8
This commit is contained in:
@@ -78,4 +78,14 @@ describe('HEIF', () => {
|
||||
sharp().heif({ compression: 'av1', chromaSubsampling: '4:4:4' });
|
||||
});
|
||||
});
|
||||
it('valid bitdepth value does not throw an error', () => {
|
||||
assert.doesNotThrow(() => {
|
||||
sharp().heif({ compression: 'av1', bitdepth: 12 });
|
||||
});
|
||||
});
|
||||
it('invalid bitdepth value should throw an error', () => {
|
||||
assert.throws(() => {
|
||||
sharp().heif({ compression: 'av1', bitdepth: 11 });
|
||||
}, /Error: Expected 8, 10 or 12 for bitdepth but received 11 of type number/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user