Crashing on JPG to JXL for large files

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
rotbus19
Posts: 81
Joined: Sat Feb 17, 2024 11:47 am

Crashing on JPG to JXL for large files

Post by rotbus19 »

200MB+ JPG files are failing to convert to JXL when I run batch convert. The files are either written as 0 bytes or don't write at all and XNView crashes to desktop. No error messages and I can't find any log files.

While attempting the conversion XnView was using over 12GB of memory at times. WTF?!

However, I can 'Save As' these large files individually.

An example JPG at 200MB+ - https://upload.wikimedia.org/wikipedia/ ... roject.jpg

EDIT - correction - 'Save As' only works sometimes. I have another JPG at 205MB and it crashes with a 0 byte JXL file written. XnViewer used up to 13,335MB while trying to convert this!! I have 'only' 16GB RAM.

EDIT - I tried running https://github.com/libjxl/libjxl against the 205MB JPG - it converted in a few seconds without problem.

EDIT - JXL Batch Converter - https://github.com/kampidh/jxl-batch-converter - also works perfectly for anyone who wants it.
Kadet
Posts: 208
Joined: Thu Oct 20, 2022 7:23 pm

Re: Crashing on JPG to JXL for large files

Post by Kadet »

rotbus19 wrote: Fri Feb 23, 2024 2:10 pm EDIT - correction - 'Save As' only works sometimes. I have another JPG at 205MB and it crashes with a 0 byte JXL file written. XnViewer used up to 13,335MB while trying to convert this!! I have 'only' 16GB RAM.
I have 32 GB RAM and me take 26 GB before crash.
I think too — it's ridiculous.
rotbus19 wrote: Fri Feb 23, 2024 2:10 pm EDIT - I tried running https://github.com/libjxl/libjxl against the 205MB JPG - it converted in a few seconds without problem.
I don't think so that it's XnView problem.
I don't know how You made jxl file via cjxl.exe (v 0.9.2) — me cjxl crash on start. And it's not only me crash on big file: www.reddit.com/r/jpegxl/comments/1aeg10 ... ng_to_jxl/
rotbus19
Posts: 81
Joined: Sat Feb 17, 2024 11:47 am

Re: Crashing on JPG to JXL for large files

Post by rotbus19 »

I don't know how You made jxl file via cjxl.exe (v 0.9.2)
Version 0.10 just released and that's what I used - default settings - '.\cjxl.exe input.jpg output.jxl'

However, a couple of JXLs produced with CJXL would not open in XnView or any other app (GIMP, Darktable). I think I fixed that by converting JPG -> TIFF -> JXL.
Kadet
Posts: 208
Joined: Thu Oct 20, 2022 7:23 pm

Re: Crashing on JPG to JXL for large files

Post by Kadet »

rotbus19 wrote: Fri Feb 23, 2024 8:22 pm
I don't know how You made jxl file via cjxl.exe (v 0.9.2)
Version 0.10 just released and that's what I used - default settings - '.\cjxl.exe input.jpg output.jxl'

However, a couple of JXLs produced with CJXL would not open in XnView or any other app (GIMP, Darktable). I think I fixed that by converting JPG -> TIFF -> JXL.
Default settings make lossless transcoding jpg to jxl. If You want converting, use something that -> cjxl in.jpg out.jxl -q 96 -j 0

Your Van Gogh crash me on transcoding (memory issue) but make jxl file using coding parameters. And output file is not reading in XnView :(

BTW XnView using 0.8.2 library.
rotbus19
Posts: 81
Joined: Sat Feb 17, 2024 11:47 am

Re: Crashing on JPG to JXL for large files

Post by rotbus19 »

Kadet wrote: Fri Feb 23, 2024 9:08 pm
Default settings make lossless transcoding jpg to jxl. If You want converting, use something that -> cjxl in.jpg out.jxl -q 96 -j 0

Your Van Gogh crash me on transcoding (memory issue) but make jxl file using coding parameters. And output file is not reading in XnView :(

Thanks - I only installed XnView yesterday and had never used CJXL before, so it's been a learning curve (!). I also ditched the CLI version for the GUI (see last edit in first post), so I was trying conversion with that.

I spent a lot of time on this yesterday (thanks to the British weather!) - conclusions: LIBJXL not reliable (yet) for large images, XnView has badly implemented LIBJXL (or see below).
BTW XnView using 0.8.2 library.
Is it? That jxl.dll is not the same size as libJPEGXL.dll. The XnView DLL has 2023/11/21 timestamp and doesn't seem to match any https://github.com/libjxl/libjxl/releases - and I've tried dropping in some but they don't work.

But if XnView is using an old one, maybe that is why it performed so poorly? A lot has changed in the last few months....
Kadet
Posts: 208
Joined: Thu Oct 20, 2022 7:23 pm

Re: Crashing on JPG to JXL for large files

Post by Kadet »

rotbus19 wrote: Sat Feb 24, 2024 9:58 am
BTW XnView using 0.8.2 library.
Is it? That jxl.dll is not the same size as libJPEGXL.dll. The XnView DLL has 2023/11/21 timestamp and doesn't seem to match any https://github.com/libjxl/libjxl/releases - and I've tried dropping in some but they don't work.

But if XnView is using an old one, maybe that is why it performed so poorly? A lot has changed in the last few months....
XnView use library made by other devs (https://vcpkg.io/en/packages). They get stuck on 0.8.2 version. Sometimes it's good, as You see on version 0.10.0 (sometimes not compatibility output files). Waiting on version x.x.2 is good practice.
rotbus19
Posts: 81
Joined: Sat Feb 17, 2024 11:47 am

Re: Crashing on JPG to JXL for large files

Post by rotbus19 »

@Kadet

Good to know. Thanks.
rotbus19
Posts: 81
Joined: Sat Feb 17, 2024 11:47 am

Re: Crashing on JPG to JXL for large files

Post by rotbus19 »

...bug is still present in https://github.com/libjxl/libjxl/releases/tag/v0.10.1 (outputs a JXL but it cannot be opened).
Kadet
Posts: 208
Joined: Thu Oct 20, 2022 7:23 pm

Re: Crashing on JPG to JXL for large files

Post by Kadet »

rotbus19 wrote: Thu Feb 29, 2024 2:41 pm ...bug is still present in https://github.com/libjxl/libjxl/releases/tag/v0.10.1 (outputs a JXL but it cannot be opened).
I'm not expert, but maybe in 0.10 used for large files some jxl trick which before not was coding in encoder and decoder compilation.
djxl nice make png image.
We have to wait on XnView with 0.10 library.
Post Reply