hhannine / superpaper

A cross-platform multi monitor wallpaper manager.
MIT License
1.15k stars 47 forks source link

[Windows] Some vertical wallpapers are rotated and cropped #111

Closed symbolboxer closed 2 years ago

symbolboxer commented 2 years ago

Describe the bug I have two vertical monitors and one horizontal monitor. They're configured for a separate image per display. The two vertical monitors are set to draw from one folder of vertical wallpapers, and the horizontal is set to draw from its own folder of horizontal ones.

Some of the wallpapers in the vertical folder, when Superpaper picks them from the folder to put on-screen, are rotated back to landscape and then stretched to fill the screen.

To Reproduce (I would expect it to work this way, but haven't disconnected two of my monitors to check)

  1. Configure a monitor in Windows Settings to use Portrait orientation
  2. Set that monitor in Superpaper to draw its wallpapers from a folder containing this wallpaper and this wallpaper
  3. Apply the settings, and observe that Diver is rotated to landscape orientation and stretched to fill the screen, while Cosmic Canyon is not.

Expected behavior Both images appear in full when chosen for the screen

Screenshots https://www.dropbox.com/s/kqmzxnhrglgpz18/Screenshot%202022-02-09%20010646.png?dl=0

Desktop (please complete the following information):

Logging / debugging contents:

Enabled logging to file.
use_hotkeys: True
hk_binding_next: ('control', 'super', 'w')
hk_binding_pause: ('control', 'super', 'shift', 'p')
get_display_data output: NUM_DISPLAYS = 3, RES_ARR = [(1440, 2560), (2560, 1440), (1440, 2560)], OFF_ARR = [(0, 15), (1440, 541), (4000, 0)]
Display(resolution=(1440, 2560), digital_offset=(0, 15), phys_size_mm=(336, 597), detected_phys_size_mm=(336, 597), ppi=108.85714285714285, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='\\\\.\\DISPLAY3')
Display(resolution=(2560, 1440), digital_offset=(1440, 541), phys_size_mm=(597, 336), detected_phys_size_mm=(597, 336), ppi=108.91792294807368, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='\\\\.\\DISPLAY2')
Display(resolution=(1440, 2560), digital_offset=(4000, 0), phys_size_mm=(336, 597), detected_phys_size_mm=(336, 597), ppi=108.85714285714285, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='\\\\.\\DISPLAY1')
load_system: archive_file not found: C:\Users\Chris\AppData\Local\Superpaper\display_systems.dat
START Listing profiles for menu.
perspective preset: default
Listed profile: Slideshow
hkBinding: ('control', 'super', 'shift', 'h')
Listed profile: example
hkBinding: ('control', 'super', 'shift', 'g')
Listed profile: example_multi
END Listing profiles for menu.
read profile name from 'running_profile': Slideshow
perspective preset: default
get_display_data output: NUM_DISPLAYS = 3, RES_ARR = [(1440, 2560), (2560, 1440), (1440, 2560)], OFF_ARR = [(0, 15), (1440, 541), (4000, 0)]
Display(resolution=(1440, 2560), digital_offset=(0, 15), phys_size_mm=(336, 597), detected_phys_size_mm=(336, 597), ppi=108.85714285714285, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='\\\\.\\DISPLAY3')
Display(resolution=(2560, 1440), digital_offset=(1440, 541), phys_size_mm=(597, 336), detected_phys_size_mm=(597, 336), ppi=108.91792294807368, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='\\\\.\\DISPLAY2')
Display(resolution=(1440, 2560), digital_offset=(4000, 0), phys_size_mm=(336, 597), detected_phys_size_mm=(336, 597), ppi=108.85714285714285, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name='\\\\.\\DISPLAY1')
load_system: archive_file not found: C:\Users\Chris\AppData\Local\Superpaper\display_systems.dat
running profile job with profile: Slideshow
Running wallpaper slideshow.
perspective preset: default
['B:\\Dropbox\\Wallpapers\\Vertical\\Beach Dreams II.jpg', 'B:\\Dropbox\\Wallpapers\\Edinburgh Castle.jpg', 'B:\\Dropbox\\Wallpapers\\Vertical\\Hacienda V.jpg']
Listed profile: Slideshow
hkBinding: ('control', 'super', 'shift', 'h')
Listed profile: example
hkBinding: ('control', 'super', 'shift', 'g')
Listed profile: example_multi
Registering binding:                                 None for profile: Slideshow
Registering binding:                                 ('control', 'super', 'shift', 'h') for profile: example
Registering binding:                                 ('control', 'super', 'shift', 'g') for profile: example_multi
Canvas size: [5440, 2575]
['B:\\Dropbox\\Wallpapers\\Vertical\\Structure III.jpg', 'B:\\Dropbox\\Wallpapers\\Desert.jpg', 'B:\\Dropbox\\Wallpapers\\Vertical\\Temple.jpg']
Canvas size: [5440, 2575]
['B:\\Dropbox\\Wallpapers\\Vertical\\Diver.jpg', 'B:\\Dropbox\\Wallpapers\\Inukchuk.jpg', 'B:\\Dropbox\\Wallpapers\\Vertical\\In The Cut.jpg']
Canvas size: [5440, 2575]
['B:\\Dropbox\\Wallpapers\\Vertical\\Cosmic-Canyon.jpg', 'B:\\Dropbox\\Wallpapers\\Branch.jpg', 'B:\\Dropbox\\Wallpapers\\Vertical\\Diver II.jpg']
Canvas size: [5440, 2575]
hhannine commented 2 years ago

Thanks for the report. This is a really crazy issue, Superpaper shouldn't be rotating any of the images. I've got one vertical monitor and I have not seen this ever. Does the problem always happen with the same images? If it always happens with the same images, could you try to save a new copy of the image and see if that does anything? I was wondering if the the orientation of the image is saved incorrectly somehow?

symbolboxer commented 2 years ago

Yes, I have noticed that it seems to be consistent per image. Per your recommendation, I re-saved one of the images, and that did not seem to help. However, after that, I tried rotating it more using Windows's built-in image rotation function. Superpaper didn't appear to change anything no matter how many times I rotated it (reapplying the profile in Superpaper after each rotation).

This makes me think that perhaps Windows has some way of applying rotation to an image that Superpaper isn't reading. I verified that the image opened properly rotated in Firefox.

hhannine commented 2 years ago

This is hopefully fixed by this 53ca836, which rotates the images according to their exif data. In the meantime before the next release, you can work around the issue by rotating and saving the images with an image editor that actually edits the image instead of just the exif tag.