linuxmint / xviewer

A generic Image viewer
GNU General Public License v2.0
75 stars 37 forks source link

Feature Request: add option to autorotate portrait pictures to fit horizontal screen #166

Open mars4science opened 2 years ago

mars4science commented 2 years ago
 * Xviewer version 3.2.0
 * Distribution - Mint 20.2

Issue On small screens pictures are hard to see. For portrait pictures ~ 2/3 of screen is left out when displaying them. Please split "automatic orientation" option to two: 1) based on metadata (I guess it is current one) "Metadata based" 2) rotate clockwise 90 degrees based on formula(s): if (horizontal resolution of screen / vertical resolution of screen) > =1.5 AND (horizontal resolution of picture / vertical resolution of picture) <= 1.5 "Better fit the screen"

TA

programmer-ceds commented 2 years ago

Should your formula not be:

if (horizontal resolution of screen / vertical resolution of screen) > =1.5 AND (vertical resolution of picture / horizontal resolution of picture) >= 1.5 "Better fit the screen"

As originally posted a square image would be auto rotated.

Not sure how many people would find this useful though.

mars4science commented 2 years ago

@programmer-ceds, Thanks for quick reply, I'm positively surprised.

Arguing (vertical resolution of picture / horizontal resolution of picture) >= 1.5 is more correct than (copy-pasted both): (horizontal resolution of picture / vertical resolution of picture) <= 1.5 sounds like programmers' humor ;-) Many people are busy, I understand. BTW that 1.5 is an example and better be editable option or config, hardcoding is not good for the future I hope you agree.

I'm mostly using small laptop, for me to rotate device to get a better (larger and properly rotated) view seems not difficult. For people on desktop with large monitor my proposed feature might seem not so useful, however I hope it won't require much changes as some form of rotation is already there.

programmer-ceds commented 2 years ago

(horizontal resolution of picture / vertical resolution of picture) <= 1.5 as in your first post would be true for images that had aspect ratios of <= 1.5:1.0 so you would be rotating landscape images which was surely not the intention. What you are looking for are images that are at least 1.5 times as high as they are wide.

This could also be achieved by changing the second condition in your original post to:

(horizontal resolution of picture / vertical resolution of picture) <= 0.666 (recurring)

(Programmers' humour can be subtle but wasn't intended here :-) )

mars4science commented 2 years ago

@programmer-ceds, my mistake, you were correct with the formula suggestion. Thanks.