Closed axisfold closed 2 years ago
When attempting to decode a specific JPEG XL file created using the libjxl binaries, RuntimeError: no frames found was thrown.
RuntimeError: no frames found
import imagecodecs fname = "jxl_q10.jxl" with open(fname, 'rb') as fh: jxlbytes = fh.read() nparr = imagecodecs.jpegxl_decode(jxlbytes)
The libjxl decoder and imagemagick can decode it just fine, with djxl.exe .\jxl_q10.jxl out.png or magick convert .\jxl_q10.jxl out.png.
djxl.exe .\jxl_q10.jxl out.png
magick convert .\jxl_q10.jxl out.png
Code and sample file in this repository.
Something goes wrong in libjxl trying to count the number of frames in the file. You can get around that by specifying to read only the first frame: imagecodecs.jpegxl_decode(jxlbytes, index=0).
imagecodecs.jpegxl_decode(jxlbytes, index=0)
When attempting to decode a specific JPEG XL file created using the libjxl binaries,
RuntimeError: no frames found
was thrown.The libjxl decoder and imagemagick can decode it just fine, with
djxl.exe .\jxl_q10.jxl out.png
ormagick convert .\jxl_q10.jxl out.png
.Code and sample file in this repository.