I may be asking in the wrong thing here but does anyone know if it is possible to search a hard drive using exiftool for images of a specific proportion? All my equirectangular images are of the proportion 2:1
Am I asking the impossible?
I did create an Aspect Ratio config file (https://exiftool.org/forum/index.php?topic=7275.0) a while back. Download it and drop it in the same directory as exiftool and you could run
exiftool -config Exiftool_Aspect_Ratio.config -r -if "$AspectRatio eq '2:1' " -filename /path/to/files/
It does need to be an exact ratio, though. One pixel off and it will return a different ratio.
Swap single/double quotes if you're on Mac/Linux.
Greetings. Im soon wish to learn the perl expressions, because so much more can be invented this way!
Im not learned Perl, so post alternate instead, but not understand "equirectangular proportion 2:1" but if "Width==2*Height", this can work.
exiftool -r -if "$ImageSize and ${ImageWidth#} == ${ImageHeight#}*2" -p $filepath .
If translation is "2*Width==Height", relocate "*2" to ImageWidth. Also to remember >= can see the longer ones also, but maybe its better to invent a range?
This invents a range to show files if ImageWidth is 2-3 times ImageHeight, but it conducts all the files because Im not use -ext
exiftool -r -if "$ImageSize and ${ImageWidth#} >= ${ImageHeight#}*2" -if "${ImageWidth#} <= ${ImageHeight#}*3" -p "$ImageWidth $ImageHeight $FilePath" .
**Edit** Im added "$ImageSize and " to block errors for files that are not images, so are without the ImageSize.
This will work for landscape orientation images, but not for portrait orientation.
- Phil
Greetings. How can exiftool calculate if picture is landscape or face, and why not also to work for both?
Im editing many portraits and exiftool seems to always conduct the same.
Aren't portrait photos "out of camera" usually actually landscape with the orientation tag set? So there will only be a problem if the photo has been physically rotated?
Greetings Alan. Yes, Im not realized there is Exif:Orientation tag! Im usually destroy all my exif, except for study files, so when Mr Harvey says it works for landscapes but not for the portraits, Im think he means it works for images of scenery, but not the faces. It seemed very illogical, so after edited many face pictures, but exiftool always conducted the same, Im getting very confused and must ask the question.
Landscape and portrait is bad words because translation is easy to confuse, so only after research its learned that landscape=wide and portrait=tall. Im always believed that rotating images and saving was really trading the width and height, but not saved in the exif, so now Im learned the Exif:Orientation values for better command.
This to show wide 2X images, includes portrait/tall that is rotated in exifexiftool -if "$Orientation#<5 and ${ImageWidth}==${ImageHeight}*2" -Execute -if "$Orientation#>4 and ${ImageWidth}*2==${ImageHeight}" -Common_args -q -r -if $ImageSize -p $Filepath .
Quote from: Alan Clifford on September 23, 2020, 05:06:47 PM
Aren't portrait photos "out of camera" usually actually landscape with the orientation tag set? So there will only be a problem if the photo has been physically rotated?
Yes.
- Phil