mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Improve detection of jp2 filename extensions #3674
This commit is contained in:
@@ -25,6 +25,13 @@ describe('JP2 output', () => {
|
||||
/JP2 output requires libvips with support for OpenJPEG/
|
||||
)
|
||||
);
|
||||
|
||||
it('File with JP2-like suffix should not fail due to missing OpenJPEG', () => {
|
||||
const output = fixtures.path('output.failj2c');
|
||||
return assert.doesNotReject(
|
||||
async () => sharp(fixtures.inputPngWithOneColor).toFile(output)
|
||||
);
|
||||
});
|
||||
} else {
|
||||
it('JP2 Buffer to PNG Buffer', () => {
|
||||
sharp(fs.readFileSync(fixtures.inputJp2))
|
||||
|
||||
Reference in New Issue
Block a user