Rawns / Reddit-Wallpaper-Changer

Reddit Wallpaper Changer
MIT License
120 stars 51 forks source link

Add option to set minimum wallpaper size #68

Open jose-a-sa opened 7 years ago

jose-a-sa commented 7 years ago

Validade wallpaper sizes? option is really buggy. If is set it cant find any wallpaper because the program does not identify the resolution correctly. For example, I have a 1920×1080 panel but it is identified as 1536×864 because of Windows scaling at 125%. Besides, I think it is trying to find a exact fit of the resolution, which is itself a problem.

A better implementation (for fill mode at least, nobody likes stretched low res wallpapers) to validate a wallpaper size would be to:

  1. find a wallpaper whose width in pixels is greater than the screen width
  2. keeping the aspect ratio fixed, check if the resized image has enough room to cover the height of the screen
  3. repeat if the wallpaper does not match the criteria

Another simpler way would be to let users set minimum width and height for wallpapers.

Rawns commented 7 years ago

Thanks for the feedback. Never considered that scaling would prevent the resolution from being identified correctly. I'll do some testing and see what can be done.

ghost commented 6 years ago

I would love this as well! Maybe even get the resolution of the primary monitor and use that. :)

qwertydog commented 6 years ago

Likely fix for this here: https://docs.microsoft.com/en-us/dotnet/framework/winforms/high-dpi-support-in-windows-forms