Filtering images for portrait/landscape mode?
Filtering images for portrait/landscape mode?
I wonder, if it's possible, since some images also may be sligthly cropped to some non standard values (e.g. being not perfectly 4:3).
And are 'normal' and 'transverse' the equivalent to portrait and landscape? I guess, i would have to re-index the database to in order to filter for aspect ratios.
And are 'normal' and 'transverse' the equivalent to portrait and landscape? I guess, i would have to re-index the database to in order to filter for aspect ratios.
Re: Filtering images for portrait/landscape mode?
I don't know if there's metadata that tells you if an image is in portrait or landscape mode directly but you can get dimensions.
Re: Filtering images for portrait/landscape mode?
Like i said, the dimensions may vary. And i have been using around ten different cameras over the years, with all different resolutions.dedupeit wrote: Thu Jan 16, 2025 7:12 pm I don't know if there's metadata that tells you if an image is in portrait or landscape mode directly but you can get dimensions.
Thanks for your answer, maybe there is another way.
Re: Filtering images for portrait/landscape mode?
With dimensions, I can use this to find landscape
And switch the comparison to find portrait
This takes the dimension, which is in the format of <width>x<height> and puts width in column A and height in column B.
Code: Select all
dimensions: add-column:a a:=regexextract(dimensions:,"(.*)x") add-column:b b:=regexextract(dimensions:,"x(.*)") columna:>columnb:Code: Select all
dimensions: add-column:a a:=regexextract(dimensions:,"(.*)x") add-column:b b:=regexextract(dimensions:,"x(.*)") columnb:>columna:Re: Filtering images for portrait/landscape mode?
That looks interesting indeed. I'm not sure, if i can put it into a custom Directory Opus mode, though.
i will check that. Do i need to make a new index for that? I guess i will, because i don't have the dimensions included yet. Thanks!
i will check that. Do i need to make a new index for that? I guess i will, because i don't have the dimensions included yet. Thanks!
Re: Filtering images for portrait/landscape mode?
Can Everything read EXIF (tag), Orientation (value)?
(I suppose it can, if Windows does see it?)
(I suppose it can, if Windows does see it?)
Re: Filtering images for portrait/landscape mode?
Thanks for the additional hint, i re-started the indexer, including 'orientation' now.therube wrote: Thu Jan 16, 2025 8:46 pm Can Everything read EXIF (tag), Orientation (value)?
(I suppose it can, if Windows does see it?)
Re: Filtering images for portrait/landscape mode?
Oh nice, I thought I looked and didn't see Orientation as an option but I see it now.therube wrote: Thu Jan 16, 2025 8:46 pm Can Everything read EXIF (tag), Orientation (value)?
(I suppose it can, if Windows does see it?)
Re: Filtering images for portrait/landscape mode?
Properties don't need to be indexed to be used. It is just slower as the information has to be extracted from each individual image.
Indexing this information makes these searches instant (in case you need it more often).
Everything is also aware of the height, width and aspect ratio of images. As a demo, try the following search:
To get a landscape/portrait column (ignoring the square images):
To find the Portrait pictures:
EDIT: All below is untested and turned out to be incorrect
I read about orientation a bit (here) and as far as I understand, it can transform the way the picture will be shown: a picture that was taken in "landscape", but should be shown in "portrait"? Change the orientation.
Assuming Everything uses numbers 1-8 to indicate different orientations (see link), the following should show the "endresult":
Indexing this information makes these searches instant (in case you need it more often).
Everything is also aware of the height, width and aspect ratio of images. As a demo, try the following search:
pic: add-column:width,height,aspect-ratioTo get a landscape/portrait column (ignoring the square images):
Code: Select all
pic: add-column:A A:=sign(int($aspect-ratio:))?"Landscape":"Portrait"Code: Select all
pic: addcol:A A:=sign(int($aspect-ratio:))?"Landscape":"Portrait" $A:="Portrait"EDIT: All below is untested and turned out to be incorrect
I read about orientation a bit (here) and as far as I understand, it can transform the way the picture will be shown: a picture that was taken in "landscape", but should be shown in "portrait"? Change the orientation.
Assuming Everything uses numbers 1-8 to indicate different orientations (see link), the following should show the "endresult":
Code: Select all
pic: add-columns:width,height,orientation,A A:=XOR(sign(int($aspect-ratio:)),int(($orientation:-1)/4)?"Landscape":"Portrait"
Re: Filtering images for portrait/landscape mode?
Regarding the indexing, too late, i'm at 97% already.NotNull wrote: Fri Jan 17, 2025 12:32 am Properties don't need to be indexed to be used. It is just slower as the information has to be extracted from each individual image.
Indexing this information makes these searches instant (in case you need it more often).
Everything is also aware of the height, width and aspect ratio of images. As a demo, try the following search:
pic: add-column:width,height,aspect-ratio
To get a landscape/portrait column (ignoring the square images):To find the Portrait pictures:Code: Select all
pic: add-column:A A:=sign(int($aspect-ratio:))?"Landscape":"Portrait"Code: Select all
All below is untested:
I read about orientation a bit (here) and as far as I understand, it can transform the way the picture will be shown: a picture that was taken in "landscape", but should be shown in "portrait"? Change the orientation.
Assuming Everything uses numbers 1-8 to indicate different orientations (see link), the following should show the "endresult":Code: Select all
pic: add-columns:width,height,orientation,A A:=XOR(sign(int($aspect-ratio:)),int(($orientation:-1)/4)?"Landscape":"Portrait"
And, even the other stuff is very interesting too, the two codes to show landscape or portrait, that exactly what i was looking for. But the next obstacle is, how to get this into the right form to be used inside Directory Opus. But i have managed to get a few other searches to work (with help from the guys), so it would be managable somehow. Or is there any known way already, how to hand over the results from Everything's list top Opus?
...
still testing, now i use
"K:\Bilder\Fotografie\*\*" pic: addcol:A A:=sign(int($aspect-ratio:))?"Landscape":"Portrait" $A:="Portrait"
which is very promising, but surprisingly slow (even though it has found almost 77,000 images), given that i just had a full indexing including 'orientation'.
Another thing, that i just found out, i can select images directly in ET, and use 'send to' into an Opus collection, which is very cool. But is there a way to hard code that 'send to' into some command (using the same collection all the time), instead of going through the context menue? Maybe not, because i guess that's Windows' functionality there. And, sorry for having so many sub topics, while the search is still running, i see the images jumping around in ETs list, so i 'freezed' the list now by having the search stopped. I also see landscape mode imeges inbetween, but they seem to be wedged out in real time.
Update: problem solved so far, i can drag & drop from ET right into the collection, which is much easier.
Anyway, that's already all very helpful, thanks!
Re: Filtering images for portrait/landscape mode?
By the way, this shorter version also works:
"K:\Bilder\Fotografie\*\*" orientation:landscape
But i wonder, why it takes so very long, even though 'orientation' is indexed now. After around 5 minutes the search is still at 6%.
Is there another property, which is required to make the search almost instantaneously?
"K:\Bilder\Fotografie\*\*" orientation:landscape
But i wonder, why it takes so very long, even though 'orientation' is indexed now. After around 5 minutes the search is still at 6%.
Is there another property, which is required to make the search almost instantaneously?
Re: Filtering images for portrait/landscape mode?
When that does work, my interpretation of the orientation property is clearly wrong. Please ignore the related column definition (the last search query)
Re: Filtering images for portrait/landscape mode?
While the code works fine, i found, that adding a rating clause to it, like in the example, mixes portrait mode and 5 stars rating in an OR mode, so that i also get landscape mode mixed into my list.
Is there a way to get AND mode working, so that i would only get portrait mode and 5 stars rating in my find list?
"D:\Fotografie\*\*" pic: addcol:A A:=sign(int($aspect-ratio:))?"Landscape":"Portrait" $A:="Portrait" rating:5stars
EDIT:
Hmm, i had another run, but this time it worked as intended.
Is there a way to get AND mode working, so that i would only get portrait mode and 5 stars rating in my find list?
"D:\Fotografie\*\*" pic: addcol:A A:=sign(int($aspect-ratio:))?"Landscape":"Portrait" $A:="Portrait" rating:5stars
EDIT:
Hmm, i had another run, but this time it worked as intended.