libjxl: BUG - Can't create a JPEG XL file from animated PNGs
Describe the bug trying to run this command to convert an APNG file to an animated JPEG XL doesn’t work:
cjxl '/home/redacted/Downloads/alexey-fedorov.png' '/home/redacted/Downloads/alexey-fedorov-apng-input.jxl'
This is what it returns:
JPEG XL encoder v0.10.3 [AVX2,SSE4,SSE2]
Getting pixel data failed.
To Reproduce
I’ve tried with two files, both from different places. Basically, take any APNG and try to convert it to JPEG XL.
This is one of the APNG I tried to convert:
Expected behavior Creates an animated JPEG XL file.
Additional context I’m using the pre-packaged binaries directly from the openSUSE Tumbleweed repositories.
I have also tried building from source with the debug symbols turned on. This is the output, the above command gave me, after building from source.
JPEG XL encoder v0.11.0 e10fb685 [AVX2,SSE4,SSE2]
./lib/extras/dec/apng.cc:899: JXL_FAILURE: Malformed chunk
./lib/extras/dec/exr.cc:29: JXL_FAILURE: EXR is not supported
./lib/extras/dec/decode.cc:151: JXL_FAILURE: Codecs failed to decode
Getting pixel data failed.
From what I understand, my input APNG is being flagged as malformed. However, I have multiple programs that can read the APNG correctly.
Environment
- OS: openSUSE Tumbleweed
- CPU type: x86_64
- cjxl/djxl version string: cjxl v0.10.3 [AVX2,SSE4,SSE2]
Edit
I also tried changing the extension to .apng, that did nothing.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (9 by maintainers)
I only have the original GIF for this one file, don’t know if the others I have are broken.
Some of the APNG files I have convert successfully with the build straight from source. Which means this is most likely an issue that I will only have with this file, because it is broken.
This is a very valid point, might be worth it to hunt down the originals then.
Anyway, as for me, this issue can be considered closed.
Sorry, I must have overread that.
The 0.10.3 release still has the issue with encoding from apng. Compile from source for it to work. Or wait until 0.11 releases in a few weks(?).