tannerhelland / PhotoDemon

A free portable photo editor focused on pro-grade features, high performance, and maximum usability.
https://photodemon.org
Other
1.38k stars 201 forks source link

[BUG] - Pre-alpha build 238 and 242 fail to download libjxl library to save in the JPEG XL format. The old pre-alpha a few months ago worked fine. #517

Closed ZPNRG closed 7 months ago

ZPNRG commented 8 months ago

I went to save a JPEG XL file using build 238 and I dialog came up saying it needed to download the libjxl library, but then I got an error message saying it had a problem. I re-launched PhotoDemon a couple of times and I was told there was an update. PhotoDemon updated to build 242. Now, PhotoDemon has never said anything about needing to download the libjxl library since the first time, but continues to give an "unspecified error" message box and fails to save the JPEG XL file.

I've been saving JPEG XL files using Paint.NET for most of 2023, but I was testing and saving JPEG XL files using the PhotoDemon nightly builds going back to late 2022/early 2023. I don't know when the change was made to download the libjxl library on the fly.

PhotoDemon error when trying to save a JPEG XL file

mizka76 commented 8 months ago

Hello, with the 242update, i tried : photodemon makes a jxl file from a jpg file without loading any library (on my Surface 6 tablet PC, win11), the thumbnail of the jxl is blank , and cannot be open with paint. Net (last update) which don't recognise the file,. Loading the jpg file in paint.net, I notice that I can save in a format called JXR ( not JXL) , the thumbnail for .jxr is ok , and photodemon opens easily the file . I hope this could help , happy new year for you Tanner, and all PD users !

tannerhelland commented 8 months ago

Hi @ZPNRG . Thank you for filing this bug report.

JPEG-XL support has been a multi-year nightmare for me. I finally wrapped up comprehensive support last November, and details on the changes to shipping libjxl as an optional download are explained at this link.

If you download a fresh PhotoDemon nightly build, and allow it to auto-download libjxl when prompted (e.g. when loading or saving a JPEG-XL file), does that work okay?

Thank you in advance for any follow-up help.

tannerhelland commented 8 months ago

Hi @mizka76 . Thank you for your comment.

Paint.NET requires an optional plugin for JPEG-XL support. It won't load or save JPEG-XL images unless that optional plugin is installed.

Hope that helps!

ZPNRG commented 8 months ago

@tannerhelland and @mizka76 That is why I stopped using PhotoDemon in early 2023 for saving JPEG XL files. I found the plugin for Paint.NET developed by null54 (https://github.com/0xC0000054/pdn-jpegxl) was more stable and has continued to improve slowly along with updates to the libjxl library updates. In fact, I'm sure null54 will be updating it before long due to libjxl having released 9.0 and working on a 9.x release. I open lossless non-compressed files in Paint.NET and save JPEG XL files (when I want that) fairly regulary with Paint.NET.

@tannerhelland I'm sorry to hear that adding the full support has been such a pain in the rear. That might not be good news for the format taking off and gaining widespread support.

tannerhelland commented 8 months ago

Thank you for the feedback @ZPNRG . I really appreciate your follow-up, and I also appreciate all your testing of JPEG-XL support over the past few years.

When Google dropped support for JPEG-XL it was a big blow to the format. Not supporting it in Chrome basically killed the format for web use. I have mixed feelings on Google's decision but it is hard to ignore that JPEG-XL is still a heavily evolving format with many complex issues still to solve.

I am not aware of any lingering bugs in PhotoDemon's current implementation (short of me needing to update to v 0.9.1 in the coming days). I hope any problems with downloading the required libjxl files would just be transient internet issues, but if you download a fresh copy of PhotoDemon's nightly builds and still can't get JPEG-XL files to work I definitely want to solve the problem, as I can't reproduce that issue locally. (Third-party firewalls would be another possible explanation - perhaps I can look at a download option that pre-includes all downloadable format plugins for PhotoDemon. It would be much larger, but might be preferable for some users.)

That said, I too use null54's plugin with Paint.NET for testing simply because it is the best, most stable version of the format I have seen! I unfortunately cannot interface with libjxl the way he does because PhotoDemon is 32-bit and has to support Windows versions all the way back to XP. Paint.NET support is limited to the latest Windows 10 and 11 builds which is a much more straightforward compatibility matrix, and as a result users on those Windows versions can really benefit from the faster, simpler updates Paint.NET's plugin provides.

Either way, thank you again for all the help ❤️

tannerhelland commented 7 months ago

PhotoDemon nightly builds now support the latest libjxl (0.10.0, released two days ago). I have also added support for auto-updating libjxl binaries independent of PhotoDemon itself, so even after downloading libjxl for the first time, the program can continue to grab library updates as they become available.

With this, I think JPEG XL support is about as comprehensive as I can get it. If anyone encounters JPEG XL trouble, please feel free to comment here or open a new issue.

Thank you again to everyone for their help on this topic!