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

JPEG XR Wallpaper Support #872

Open
willamettefour opened this issue Aug 30, 2024 · 3 comments
Open

JPEG XR Wallpaper Support #872

willamettefour opened this issue Aug 30, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@willamettefour
Copy link

Describe the enhancement or feature you'd like
Windows 11 24H2 (which, yes, I know is still technically an insider build) allows you to have HDR wallpapers using a JPEG XR image. However, AutoDarkMode currently only allows PNGs, JPEGs, and bitmaps to be selected.

Describe alternatives you've considered
As I understand it, the only way to get an HDR background is by using a JXR image. I've tried replacing the .jxr file extension with .png to force AutoDarkMode to accept the file, but that results in the wallpaper having messed-up colors.

@willamettefour willamettefour added the enhancement New feature or request label Aug 30, 2024
@Spiritreader
Copy link
Member

Spiritreader commented Sep 15, 2024

Could you verify that both

SystemParametersInfoA:
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfoa

SPI_SETDESKWALLPAPER
0x0014

and IDesktopWallpaper
https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-idesktopwallpaper

support JPEG XR?
These are the two interfaces we use.

I don't have a HDR display, so getting this implemented would need third party testing and/or development assistance.

If so, i can just enable support in the UI.

@ThioJoe
Copy link

ThioJoe commented Oct 2, 2024

Actually they do work (just tested it), you just need to have HDR mode enabled. The preview won't look right but when it gets applied as the wallpaper it will look right.
image

Also by the way, you can work around the file selection types by putting an asterisk in the file name box and hitting enter, which will allow you to select any file type. This works for any windows program.

image

I will point out the native background image picker in Windows does allow for a lot more options than it lets you pick in ADM.

Might be worth adding the same options. For the more rare ones that might not be worth adding a bunch of code just to display a preview, you could just add a placeholder message saying "Can only preview [whatever types]."

image (Ignore the blown out colors for the wallpaper in that screenshot, it looks correct in real life)

Spiritreader added a commit that referenced this issue Oct 2, 2024
"|*.jpg; *.jpeg; *.bmp; *.dib; *.png; *.jff; *.jpe; *.gif; *.tif; *.tiff; *.wdp; *.heic; *.heif; *.heics; *.heifs; *.hif; *.avci; *.avcs; *.avif; *.avifs; *.jxr; *.jxl"
@Spiritreader
Copy link
Member

Spiritreader commented Oct 2, 2024

Might be worth adding the same options. For the more rare ones that might not be worth adding a bunch of code just to display a preview, you could just add a placeholder message saying "Can only preview [whatever types]."

@ThioJoe I've added all supported options to the UI selector.
In theory any image file that are listed here should also be previewable by the UI framework, they might just look off.
Does the preview look okay for you?

@willamettefour jpeg xr should work in the latest beta build (10.4.2.24)

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

No branches or pull requests

3 participants