ORelio / Spotlight-Downloader

Download Windows Spotlight images and apply them to wallpaper or lockscreen.
182 stars 27 forks source link

No 4K Compatibility #30

Closed MNLierman closed 3 months ago

MNLierman commented 3 months ago

Issue: This script doesn't appear to support 4K resolution, despite the max res parameter.

Abstract: 4K screens have become predominately mainstream as manufacturing costs for 4K displays have significantly dropped, and 4K screens are more accessible at more reasonable prices that fit the budget of a broader range of people. More and more people are adapting 4K displays, including myself. This raises an important issue which is instantly obvious, this script seems to only download 1080p resolution. On my Samsung 4K monitors, the images appear pixelated and blurry. This problem is not related to compression or the lockscreen settings but rather the resolution of the images downloaded from the API, which are only 1080p. I appreciate this script for what it does, especially the random selection of a lockscreen image, giving a unique look when powering on your computer. Microsoft's lack of customization options for the lockscreen, the forced advertising, and inability to fine tune your lockscreen options, is frustrating to say the least. Thus, I find value in this project, and aim to understand why this script only supports 1080p. I will be exploring and researching this issue, and I may be seeking assistance in implementing a fix.

Details:

Questions:

  1. @ORelio, do you use this script yourself, because this issue is very obvious.
  2. Is there a known method to update the script to download 4K images?
  3. Could the issue be that the Spotlight API archive predominantly contains 1080p images?
  4. Is there a difference between the Bing Image of the Day and Spotlight images? Has Microsoft made any changes to the Spotlight feature?
  5. Could this script be updated to only pull images 4K and higher? Do those even exist in the archive? In your documentation, you state that there is no list of images, so when the API call is made, Bing is giving the script 1 image? Can the API call be made to demand a higher resolution from Bing? The max-res appears to not work. I'm surprised that Spotlight even uses 1080p, as Microsoft Surface Pros have used 1440p for years.

These are questions I am looking to understand during my research on this issue.

Where To Begin: I have a good understanding of C#, but my knowledge of APIs, JSON, and web applications is limited. Therefore, I might struggle to implement a fix for this issue on my own. I will be conducting research to understand this a little deeper, but it would be nice to know how much anyone, or @ORelio knows about this API and any ideas for implementing a fix for this. I wasn't really wanting to abandon the script, unless someone else has created a better version already.

Thank you for your time and assistance.

ORelio commented 3 months ago

Hi @MNLierman,

As you noticed, the API is indeed limited to 1080p. For now, I don't have information about newer 4K API that may be present on Windows 11, so I cannot implement it. If you find information about it, do not hesitate to share as implementing it should be fairly straightforward if it's similar to the existing one.

  1. Yes I'm still using the script. The images are slightly blurry on my 1200p display.
  2. No, if I had info about 4K API I would have implemented it myself
  3. Yes, the Spotlight API will return images matching your display OR 1080p images if your display exceeds that resolution
  4. Yes, the Wallpaper API from #29 is known to return different images, I have no info about it either
  5. The API takes resolution from your screen, e.g. if your screen is 720p you will get one random 720p image. The maxres parameter replaces the actual info with 9999x9999 so you get the maximum res the API is willing to return, which is 1080p.

Where to begin: We would need documentation about the newer APIs so we can implement them.

ORelio commented 3 months ago

I'm happy to let you know that after digging around, I found the new API endpoint for 4K images and implemented it in SpotlightDownloader v1.5.0.

I took this opportunity to adjust the caption feature to upscale the image before adding text in case the image is smaller than your screen, so that even 1080p images should have a sharp caption on your 4K display.

Let me know if you are still facing any issue with Spotlight Downloader.