-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AVIF: "Error: source: bad seek to ..." with 0.28.1 #2688
Comments
This looks like a 10-bit AVIF image. $ heif-info -d testimage.avif | grep bit
| | | bits_per_channel: 10,10,10
| | | high_bitdepth: 1
| | | twelve_bit: 0 Please see the changelog for v0.28.0 at https://sharp.pixelplumbing.com/changelog#v0280---29th-march-2021
We should probably try to improve the error messaging, which is likely to involve a libvips or libheif change. |
@lovell ahhh ok, thanks for checking this. My confusion was having a previously working test in a package that depends on sharp fail when I tried to drop the newer version in. Just for my own understanding, does it blow up the size of the libraries to have the additional bit depths? Definitely think a more specific error message wouold be really helpful, although I appreciate arranging something specific for this case could be a challenge. I was a little surprised that an empty file would be written, but I guess that is because the error actually comes out of the stream as it sees bytes that aren't understood (and as it happens the way it's used in the dependent module wouldn't result in this). |
Yes, not supporting higher bit depths reduces the binary size of the aom dependency by ~30%. Output AVIF images from sharp/libvips were and still are always 8-bit per channel. Please subscribe to lovell/sharp-libvips#97 for updates about a possible switch to smaller/faster alternatives for AVIF that might allow reading higher bit depth images again. It looks like libheif generates a "warning" for this image with the message |
Note that this restricts accepted AVIF images to 8bit only - see: lovell/sharp#2688 https://sharp.pixelplumbing.com/changelog#v0280---29th-march-2021
PR to improve the libheif error messaging at strukturag/libheif#497 |
any hope of getting images with bit depth 10 supported? (by default) |
@Zutatensuppe Please subscribe to lovell/sharp-libvips#97 for updates about a possible switch to smaller/faster alternatives for AVIF that might allow reading higher bit depth images again. |
What are the steps to reproduce?
Run the following script after unzipping the attached test image:
What is the expected behaviour?
With sharp 0.27.2, an output image is correctly generated and
null
is logged to the console. With sharp 0.28.1, the bad seek error is logged. An output file is present but appears to be empty.Are you able to provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem?
See above.
Are you able to provide a sample image that helps explain the problem?
See attached.
What is the output of running
npx envinfo --binaries --system
?testimage.avif.zip
The text was updated successfully, but these errors were encountered: