Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low image quality of lossless JXL when used as desktop wallpaper in Windows 10, version 21H2 #48

Open
bananakid opened this issue Jan 12, 2025 · 2 comments

Comments

@bananakid
Copy link

I noticed that if I convert a PNG to lossless JXL (using cjxl -j 1 -d 0 -e 9 --brotli_effort=11 Image.png Image.jxl from Luca Versari's repository) and apply JXL as a desktop wallpaper image in Windows 10, version 21H2, the quality of the desktop picture is significantly lower than if the PNG file with the same image is used. I have compared JXL as desktop picture to JPG (JPG generated from the same PNG using XnView MP with highest JPG quality) as desktop picture and while JXL output is a little bit better than JPG, it still doesn't come close to PNG.

PNG

JXL

JPG

I'm using the latest release of JPEG XL WIC of this repository. I've uploaded PNG, JXL and JPG here in case it helps.

I hope this can be addressed so I could finally completely move all my images to JXL.

@saschanaz
Copy link
Owner

I'm afraid that Windows internally just converts the image to JPG. It only loads jxl_winthumb.dll when initially setting the background image and restarting explorer.exe does not load it again. The dll certainly passes the full resolution and there's no way for the decoder itself to emit a regressed image. That's an encoder's job and not decoder's, meaning reencode probably happened.

@bananakid
Copy link
Author

@saschanaz, thank you for taking time to respond promptly, you're correct — there's nothing WIC can do about it. Luckily, I've found a couple of known workarounds for this:

  1. Use "Slideshow" option for desktop picture — this way images won't be reencoded in any way. This is the recommended workaround as it preserves full lossless JXL quality for desktop picture output (i.e. no banding in gradients).
  2. Create a new DWORD value JPEGImportQuality in Windows Registry key Computer\HKEY_CURRENT_USER\Control Panel\Desktop and set it's decimal value to 100 — this way compression quality will be way less noticeable, but image will still be reencoded (i.e. banding in gradients).

I believe this information might be helpful to some JPEG XL enthusiasts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants