You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you using the latest version? Is the version currently in use as reported by npm ls sharp the same as the latest version as reported by npm view sharp dist-tags.latest?
Yes, 0.29.0.
What are the steps to reproduce?
Feed sharp an animated gif or animated webp file, and convert to avif.
What is the expected behaviour?
Output data should be a working animated AVIF file. It doesn't throw an error, but the file decodes as a white square in Chrome and fails to decode in IrfanView. So either animated avifs are broken, or it should throw an error and the documentation should be updated to say they are not supported.
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
sharp(imgData, { animated: true }).avif().toBuffer( resolveWithObject: true; }
where imgData is a data buffer of an animated image (gif or animated webp).
Are you able to provide a sample image that helps explain the problem?
AVIF sequence files (AVIS) aren't supported by the underlying libheif - please see strukturag/libheif#377
libheif does support the addition of multiple "planes" as part of the HEIF container, which is what libvips is using in this example. However this appears to be creating invalid images, so perhaps we should add logic to libvips to block this, at least when using AV1 compression.
Commit 5d98bcd prevents broken AVIF images from being created via sharp, plus adds a test that would previously have failed as well as a brief note about this to the docs. Thanks for reporting this.
Are you using the latest version? Is the version currently in use as reported by
npm ls sharp
the same as the latest version as reported bynpm view sharp dist-tags.latest
?Yes, 0.29.0.
What are the steps to reproduce?
Feed sharp an animated gif or animated webp file, and convert to avif.
What is the expected behaviour?
Output data should be a working animated AVIF file. It doesn't throw an error, but the file decodes as a white square in Chrome and fails to decode in IrfanView. So either animated avifs are broken, or it should throw an error and the documentation should be updated to say they are not supported.
Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
sharp(imgData, { animated: true }).avif().toBuffer( resolveWithObject: true; }
where imgData is a data buffer of an animated image (gif or animated webp).
Are you able to provide a sample image that helps explain the problem?
Input file: https://cloudflare-ipfs.com/ipfs/bafybeifcmh3muodb5shyhptrobbstvcalw67fb32vuzugl5y7vlsh4mw4y/1b9a0df060d6c860abbeae9b8fc6b82c8084a255844ce40ff011d14cb8563dce.gif
Broken output file: https://www.cloudflare-ipfs.com/ipfs/bafybeifcmh3muodb5shyhptrobbstvcalw67fb32vuzugl5y7vlsh4mw4y/fd54a2b9fb9022c76a55d3e40e8db26b5d35f3f30010ad0b4fe89dd57c04212a.avif
What is the output of running
npx envinfo --binaries --system
?System:
OS: Windows 10 10.0.19043
CPU: (4) x64 Intel(R) Core(TM) i5-7600K CPU @ 3.80GHz
Memory: 11.62 GB / 31.94 GB
Binaries:
Node: 14.17.5 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.20.6 - C:\Program Files\nodejs\npm.CMD
The text was updated successfully, but these errors were encountered: