Start out with a folder of randomly selected photos
Use a shortcut to iterate over the folder’s contents and select, say, 20 photos that are in landscape orientation that I can use as desktop background images.
Move the selected photos into a specified directory
I can figure out steps 1 & 3, but am stuck on step 2. It seems there is a file filter that will allow me to filter images, and within that an option to filter by orientation (using ‘up’, ‘down’, ‘left’, ‘right’, etc.). However that doesn’t seem to get me what I want - no matter which option I choose, photos in both portrait and landscape orientations pass through the filter. I haven’t been able to find a way to truly only filter down to landscape-only photos.
Is there an easy solution that I am missing here? This doesn’t seem to be an unsolvable problem, but I’m stumped on options for Step 2.
If you have just one image in the folder, when that is found by Shortcuts, what does it think the orientation is if you just reference that and output it in a show result? Does it change if you then use a ‘get image from input’ action on the file and check the orientation?
I’m wondering if Shortcuts is checking the property of the file rather than the property of the image that the file represents.
I would normally check it myself but it is late for me and I’m just about to turn in for the night.
Thanks for the suggestion - I was wondering which metadata it might be reading (the file vs. the image) and if that could be a clue, but wasn’t sure how to tell - your suggestion was a good idea. However, while I hadn’t had it set up that way, now I do and it still seeing odd behaviors on my end.
For the moment my flow is set up to loop through the pictures with a step that will open the files in preview that trigger a certain condition. I continue to see pictures in both landscape and portrait orientations that are being opened. I realize that I don’t understand those options (up, down, left, right, mirrored, etc.) - are those supposed to relate to portrait vs. landscape?
This gets the width and height and divides them. If the result is greater than 1, the photo is in landscape. Otherwise, it’s in portrait (or square, but let’s not worry about that for now).
In addition, if you need photos of a specific aspect ratio, you can find the ratio in decimal and use this logic to filter those images out.