Open DeviantBadge opened 9 months ago
Mac Ventura - 13.5 Python - 3.8.18
Hello @fdintino !
If we run following code on attached image:
import pillow_avif pillow_avif.AvifImagePlugin.AvifImageFile('6963c773e084a08167962a5a05d6.avif')
We will get an error:
Traceback (most recent call last): File ~/miniconda3/envs/selenium/lib/python3.8/site-packages/IPython/core/interactiveshell.py:3508 in run_code exec(code_obj, self.user_global_ns, self.user_ns) Cell In[2], line 1 pillow_avif.AvifImagePlugin.AvifImageFile('/Users/evgenivorobyev/Downloads/6963c773e084a08167962a5a05d6.avif') File ~/miniconda3/envs/selenium/lib/python3.8/site-packages/PIL/ImageFile.py:117 in __init__ self._open() File ~/miniconda3/envs/selenium/lib/python3.8/site-packages/pillow_avif/AvifImagePlugin.py:61 in _open self._decoder = _avif.AvifDecoder( File <string> SyntaxError: Failed to decode image: BMFF parsing failed
But if we run console command avifdec with --no-strict option (without it, avifdec also fails with similar error), decoding will finish correctly.
avifdec
--no-strict
May you add opportunity to turn on --no-strict option?
Image is compressed in zip archive, because github can't handle avif image file: 6963c773e084a08167962a5a05d6.avif.zip
Same is happening to me. How should we fix it?
Mac Ventura - 13.5 Python - 3.8.18
Hello @fdintino !
If we run following code on attached image:
We will get an error:
But if we run console command
avifdec
with--no-strict
option (without it,avifdec
also fails with similar error), decoding will finish correctly.May you add opportunity to turn on
--no-strict
option?Image is compressed in zip archive, because github can't handle avif image file: 6963c773e084a08167962a5a05d6.avif.zip