| Summary: | JXL images losslessly transcoded from jpg fail to load | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kimageformats | Reporter: | Alastor Tenebris <livingnightmare> |
| Component: | general | Assignee: | Alex Merry <alex.merry> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | aacid, FreshlyToe, kdelibs-bugs-null, mircomir, xpeq07 |
| Priority: | NOR | ||
| Version First Reported In: | 6.7.0 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Image Converted From PNG To JPG TO JXL
Image Converted From PNG To JXL Screnshot of opening the file. Animated JXL that fails to decode with kimageformats 6.9.0 |
||
|
Description
Alastor Tenebris
2024-11-16 15:49:41 UTC
Can you attach a sample image that shows this problem? Created attachment 175935 [details]
Image Converted From PNG To JPG TO JXL
Created attachment 175936 [details]
Image Converted From PNG To JXL
Created attachment 175937 [details]
Screnshot of opening the file.
The left side is Eye of Gnome, the right is Gwenview. Both were installed via Fedora 41's RPMs.
Mirco, can you have a look? A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kimageformats/-/merge_requests/278 Git commit 92a1752c1f72543b6693ee5113b5769b38b5edf4 by Albert Astals Cid, on behalf of Mirco Miranda. Committed on 20/11/2024 at 16:34. Pushed by aacid into branch 'master'. JXL: load error with some lossless file When loading lossless JXL images without ICC profile, the parser failed. The problem was caused by Boxes being enabled (MR !250). The parser should probably be revised to be more flexible. A +- -- autotests/read/jxl/rgb_lossless_noprof.jxl A +- -- autotests/read/jxl/rgb_lossless_noprof.png M +8 -5 src/imageformats/jxl.cpp M +1 -1 src/imageformats/jxl_p.h https://invent.kde.org/frameworks/kimageformats/-/commit/92a1752c1f72543b6693ee5113b5769b38b5edf4 *** Bug 496360 has been marked as a duplicate of this bug. *** Some animated JXLs still fail to decode with kimageformats 6.9.0: `Unexpected event 16384 instead of JXL_DEC_FRAME` (16384 = JXL_DEC_BOX) The code around https://invent.kde.org/frameworks/kimageformats/-/blob/92a1752c1f72543b6693ee5113b5769b38b5edf4/src/imageformats/jxl.cpp#L361 assumes that all the JXL_DEC_FRAME events are contiguous, but in fact they can interleave with JXL_DEC_BOX. I don't have the example file to share at the moment, but the sequence of decoder events was as follows: JXL_DEC_BOX JXL_DEC_BOX JXL_DEC_BOX JXL_DEC_BASIC_INFO JXL_DEC_COLOR_ENCODING JXL_DEC_BOX JXL_DEC_BOX JXL_DEC_FRAME JXL_DEC_BOX JXL_DEC_FRAME Notice the FRAME - BOX - FRAME sequence at the end, which confuses the `countALLFrames` function. Created attachment 177007 [details]
Animated JXL that fails to decode with kimageformats 6.9.0
Attached an example.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kimageformats/-/merge_requests/303 Git commit e6a0f8758b5fc62f569635df971e06b8ff9ac365 by Mirco Miranda. Committed on 04/01/2025 at 06:46. Pushed by mircomir into branch 'master'. JXL: Fix missing checks for BOXES when parsing animation Fix error when parsing something like: ``` JXL_DEC_BOX JXL_DEC_BOX JXL_DEC_BOX JXL_DEC_BASIC_INFO JXL_DEC_COLOR_ENCODING JXL_DEC_BOX JXL_DEC_BOX JXL_DEC_FRAME JXL_DEC_BOX JXL_DEC_FRAME ``` A +- -- autotests/read/jxl/bug_496350.jxl A +- -- autotests/read/jxl/bug_496350.png M +28 -10 src/imageformats/jxl.cpp M +1 -0 src/imageformats/jxl_p.h https://invent.kde.org/frameworks/kimageformats/-/commit/e6a0f8758b5fc62f569635df971e06b8ff9ac365 Fixes in KF 6.11 |