Orientation

Started by zematima, October 08, 2015, 02:45:52 PM

Previous topic - Next topic

zematima

Hi:
I made a dinamic category (Orientation) with this label:
XMP::tiff\Orientation\Orientation\0
The main goal is divide the photos in the two orientations they were taken:
Horizontal
Vertical
The result was this after applying was :
Horizontal (normal)
Other
Rotate
Rotate 270 CW
Rotate 90 CW
So is there any other label / variable - or anything you suggest - that could give me immediatly the results I want ?
Thanks in advance.
JRosa.



Mario

The EXIF orientation metadata tag has all these variants. If all variants are used by at least one file in your database, you'll end up with this many child categories.

But this data does not necessarily reflect the 'displayed' orientation of your file anyway!

+ A file can be rotated by the EXIF orientation (if there is a non-default one)
+ A file can be rotated by the XMP Crop (if there is one and you have enabled it for the given file format).
+ A file can be virtually rotated in IMatch when the user applies a virtual transformation.

All this has to be taken into account in order to correctly determine in which orientation a file is displayed - I here assume this is what you are after.

There is currently no way to do that with a data-driven category. There is no metadata tag which encompasses all this information, and there is also no IMatch variable which returns this information.

Calculating such a variable would be possible, but 'expensive' in terms of processing power - and thus slow.

Doing this for one file would be OK. But doing this for 50,000, 100,000 or even 300,000 files when a data-driven category needs to be updated will take a very long time...

There is a filter in the Filter Panel (Orientation & Dimensions) which allows you to find all portrait / landscape files. This filter is highly optimized, but still runs quite a while if a user applies it to an entire database. I could further optimize it by dividing the processing between all processors, but this is a rarely used filter and usually the scope is a single folder so it's quick enough.

If I would have to implement such a variable I would need to add code which calculates the "displayed" orientation of each file once and stores it in the database. The I need to add code which updates this information whenever the file is updated, metadata is changed, virtual transformations are changed or the user changes the per-file- format metadata options related to XMP cropping. Quite a bit of work...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima

The Orientation & Dimensions does what I want.
Thanks Mario.
JRosa.