Created attachment 155067 [details] exceptional JXL file SUMMARY A particular jxl file (attached) causes an unexpected error when loading in Krita. Krita opens other JXL files with no issue, and this image does not display in firefox nightly with JXL support, so I suspect that this file is an unusual edge case of the format. The particular image is one of a collection of intentionally-small jxl files. Quoting the JXL Art Gallery page (https://jpegxl.info/art/) > JXL art is a form of procedural image generation that exploits the powerful meta-adaptive context model (and other fancy coding tools) of JXL to produce interesting-looking images that are tiny jxl files. STEPS TO REPRODUCE 1. download the jxl file attached to the issue (originally downloaded from the JXL Art Gallery https://jpegxl.info/art/2021-08_totocaca.jxl) 2. Open the file in Krita, e.g. a. Select File -> Open b. Select the file in the file browser OBSERVED RESULT Krita displays the following error: > Could not open <Path to file>. > Reason: Unexpected error. Please contact developers. EXPECTED RESULT Krita loads and renders the image. SOFTWARE/OS VERSIONS Windows: Windows 10 Home, version 21H2, build 19044.2364 ADDITIONAL INFORMATION I also posted this issue to the krita-artists discourse server before being redirected to the KDE bug tracker. Original post: https://krita-artists.org/t/unexpected-error-please-contact-developers-when-loading-jxl-file/55294
Amyspark, can you take a look?
Seems like an upstream issue. I can reproduce it with libjxl's decode / djxl as well, both on v0.7.0 release used by Krita, and on libjxl latest master (git ee70a3ff) produces a same error: > JPEG XL decoder v0.8.0 ee70a3ff [AVX2,SSE4,SSSE3,Unknown] > Read 81 compressed bytes. > Failed to decode image > DecompressJxlToPackedPixelFile failed
Found it. It's "Rubin golden vase 1" from https://jpegxl.info/art/ and it doesn't render on Firefox. It does have a source linked from which I can render it, so I'll take a look after the Qt 5.15 mopping. Assigning to myself.
Some additional info from libjxl group: It is indeed an upstream patch that go way back to December 2021 that prevents usage of unusual / outrageous splines for safety reasons: https://github.com/libjxl/libjxl/commit/198d5f33cfaab1ccbda83c8d36bbff99ca092600 As for why the linked source from https://jpegxl.info/art/ can still render it, possibly because it used an old version of jxl.js / WASM..
Ok, then closing as intended by upstream.
Could the error message be improved beyond "unexpected error"? As it is, anyone loading a file like this (malicious, contrived or otherwise) will be instructed to contact the developers
Yes, that needs to be investigated. I've removed the remark about contacting developers, though -- it was both ungrammatical and unhelpful.