Add bitdepth option to heif output (#4036)

Prebuilt binaries support only AVIF with a bitdepth of 8
This commit is contained in:
Mert
2024-03-21 10:36:17 -04:00
committed by GitHub
parent dc07fd4e9c
commit 3c26080c39
7 changed files with 35 additions and 2 deletions

View File

@@ -144,4 +144,10 @@ describe('AVIF', () => {
/Processed image is too large for the HEIF format/
)
);
it('Invalid bitdepth value throws error', async () => {
assert.rejects(
() => sharp().avif({ bitdepth: 11 }),
/Error: Expected 8, 10 or 12 for bitdepth but received 11 of type number/);
});
});