Feature-Request: Portrait/Landscape images, stretching-values...
my main-wish:
i have one folder with pictures of different orientation (portrait/landscape) and different sizes (mostly near to full-hd 1920x1080, but all more or less)
i have two screens as picture frames running. one is normal in landscape orientation, one stands up in portrait-orientations and there is the raspberry settings adjusted to 90 degree screen rotation.
everythings running more or less fine. exexpt:
all images are zoomed to fit the full-screen regardless of their orientation.
first, it would be great, if i could use an option-switch to let fbpy show only pictures with portrait-oritientation on my portrait-monitor. And also only landscape-orientated-pictures on my landscape monitor.
second: it would be great, if i could set steps or percentage levels for zooming/shrinking. so i could say: landscape-images are only allowed to get zoomed/and-or/shrinked 10% to fit the screen, otherwise left out and not showing as ugly streched.
also the same as a separate option for all my portrait-images on my portrait-monitor
Extension to this: one can think of levels (1-5?) for zooming/streching/shrinking instead of percent, or an association of steps ie. 1-9 as a shortversion of 10-90% percentage levels...
one could think of allowed zoom/shrink steps/levels bound separatly to certain sized images (small 200x300, medium 500x500, HD 1000x1000) or the like.
:gift: :gift: :gift: :gift: :gift: :smiley: :smiley: :smiley: :smiley: :smiley: :smiley:
Maybe there're easier ways to do this. How about an utility script that separating images into folders after checking its size? If this step is implemented inside the main script, it'll try examining images every time it loads up for same results which makes it seriously inefficient.
i could do this with scripting on the linux side, but you once said, python is a replacement for this :smile:
seriously, could it be a first step to have a switch -landscape and -portrait which inside checks before loading the image, if resolution is landscape or portait-orientated. so the image is only loaded in the image-list, if it has the right orientation.
so, if it is a switch-option, anybody can chose or omit this option (in one believes it is inefficient). my raspberry has nothin else to do than to show pictures, so i would personnally burden him this task. :smile:
to check for streching-levels could be a following option :gift: :gift: :gift: :gift:
I'll just add util.py which does that. Please try it out later when it's ready.
It's ready on 802d2df0f8ccb9b796fd74a086b35fdedb4f2cde
cool. big thanks from me, i am on vacation for 10 days now. i will see if i can test it remotely :+1:
i am back on my desk and checked the util functions. cool+thanks for all the improvements. but for my personal needs, at the moment i dont want to change files on the file-system.
i would love to see a switch, which only considers playing -h (horizontal/landscape) pictures to display. or similar -v/-p (vertical/portrait) switch, which only considers images in portrait orientation to display.
with this, i could have the same raspberry-image or mounted folder with all pictures/images to display in one place, but my two frames would only display landscape/portrait images in the right orientation with their physical orientation.
as there must be a orientation-checking routine in util.py, maybe one could utilisize this as a switch?
:smiley:
I've got an idea. How about a pipe-connected way?
python3 util.py list -v Pictures | sudo python3 main.py
To play all vertical images under Pictures directory.
You could python3 util.py list -v Pictures > vertical.txt to save this list and play with cat vertical.txt | sudo python3 main.py later.
i can try this... and see how it goes..
i know a switch is much more work to code, but at the end, you once suggested a all-in-one-python-better-than-bash-solution.. :smiling_imp:
(i started to read a python-coding-for-begginers-book) on holiday... :wink: )
Although using pipe, all scanning to check image sizes are gonna be done with python.
Pipe here just passes the list of files which are the result of python script.
This kind of implementation can also be simplified into an option like main.py -hf which is going to be expanded to do the exact same pipe work. Would that be okay?
as fb.py is now running over 1 day without issues (fantastic!), there comes some minor beautifings to my mind again..
some of the images are not in the right aspect-ratio, because they are all globally streched or squeezed to (my) display-resolution 1080x1920.
i actually have not the best idea, how to handle smaller or bigger images and how to handle resizing for the best adaption to different resolutions/orientation.
but the first start could be, to see the resolution of the images in the -vb (debug) output. than i can watch whats going on and develop some ideas, how to handle image-adaption?
what do you think?