JPEG XL Viewer plugin

I made a plugin for JPEG XL.

It's a fairly new format, only standardized this year (2022). It has some very useful features though, not least of which is being able to losslessly transcode JPEG files with around 20% smaller output.

ICC colour profiles are not supported, but it's not clear exactly how the decoding works so I'd be interested to know if the colour looks right on files with those profiles.

Finally, HDR is not supported either, because Opus doesn't support it.

Copy both the .dll into the Viewers folder and refresh the plugin list in Opus.

10 Likes

V0.02 prevents the system getting very slow when creating thumbnails by limiting Opus to one thread for JPEG XL files.

1 Like

My Bro. After I followed your instructions and opened the folder containing JXL images, DOPUS immediately crashed and closed.

I'll get an updated version posted soon. In the mean time, I think the issue is you need to have the DLL in the main DOpus program folder, not the plugins folder. I'm not sure why, it is supposed to look in both places. When I have time I'll debug it.

Viewer plugins should only be loaded from the plugins folder. Opus won’t look for them in the main folder.

Yeah, I mean the libjxl.dll, not the plugin. I wrote code that is supposed to check the current directory and then the current directory + "viewers/" or whatever the path is, but it clearly doesn't work. I'm not really a desktop developer, I do embedded, so bare with me or feel free to submit pull requests.

Things stalled a bit because libjxl has performance issues, and they broke the Windows build too. At some point I will try to cross compile it from WSL and update.

1 Like

Wait for your updata.

Using JXL v0.02 and Dopus v12.31 x64

Unfortunately, when I enable this plugin, I get an error every time I view my Avatars folder which is filled with JXL files. When I switch from Details to Thumbnail mode, Dopus crashes.

Disabling the JXL plugin didn't work. I had to exit Dopus completely, browse to the folder in a regular Windows File Explorer and delete the 2 JXL plugin files using Administrator

Now Dopus no longer crashes. Weird.

Sorry for no error log or screenshot.

I might spend some more time on this, getting it up to scratch. The main issue is that the last time I tried to build the JXL DLL for Windows, the build was broken. If/when they fix it, my plan is to integrate everything into a single DLL to avoid having issues with paths.

1 Like

New version 0.03.

Updated libjxl to 0.9.2. Performance seems to be a little better, but only a little.

Now statically linked, no need for a separate libjxl.dll. Just copy the jpegxl.dll into your viewers folder.

There are two versions. The normal one tries to detect small images, typically thumbnails, and decode them in single threaded mode. The jpegxl_multi.dll version just uses multi-threaded decoding for everything.

I have not found a good way to benchmark them so I can't say for sure which is better.

There's also a thumbnail handler here:

Your plugin is much better, but anyone who's having problems with it might want to give this a go. It's purely thumbs though - no metadata, preview or opening in D8Viewer.

1 Like

I see they just released 0.10.0 which supposedly fixes a big performance regression. I'll see about getting it integrated, but at the moment it's a bit of a pain to build.

Beta 0.04: Release Beta 0.04 · kuro68k/JPEG_XL_dopus · GitHub

2 Likes

And thumbnail is generated in DOpus but not in Explorer. Picture in question is in JPEG XL format and it seem that it is handled by JPEG XL Viewer Plugin 0.0.0.4 (picture is not shown in Viewer if the plugin is disabled in Preferences).
Directory Opus Pro 12.33 Build 8659 x64
OS 6.1 (B:7601 P:2 T:1) SP 1.0 "Service Pack 1"

Picture is attached in thread:

This plug-in is for DOpus, it won't show anything in Explorer.

Apologies.
First sentence should be:
Picture shown in Viewer but not in Viewer Pane and thumbnail is generated in DOpus but not in Explorer.
I just copied it from thread titled" Picture shown in Viewer but not in Viewer Pane".

I mentioned Explorer to exclude possibility that there is other component (e.g. WIC codec) involved.
And picture is not displayed if in archive.

I was going to write that Explorer and DOpus thumbnails are separate, but I realised you already know this.

As I said in your other thread, it may be another plugin trying to open the file. The MetaPlugin is often the culprit.

Try opening a JPEG-XL with D8Viewer, which should be in the DOpus directory - just right click the image, Open With, Choose Default Program, and select D8Viewer in the DOpus directory.

If it fails to open, which it should if it isn't working in the preview panel, then it should tell you which plugin is being used to try to open the image.

I don't think this is an issue with the plugin. The API is very simple and I didn't see anything about the viewer pane in there when I looked before. I think xraale is probably right, it's more likely to be some kind of Opus or other plugin issue.

It opens in Viewer both after double clicking or using Open With, Choose Default Program, and select D8Viewer method.
I have disabled other plugins for test and I have restarted Opus. I do not see MetaPlugin. I think that it is not installed with DOpus 12.

MetaPlugin comes with DOpus. It's listed as MetaPlugin (Preview/Office/Web/ActiveX).

If it isn't there, then there's something very wrong with your installation and could explain your issues. You could try uninstalling DOpus completely and re-installing it.