Author Topic: Horizontal/Vertical keywords based on orientation and/or crop  (Read 3002 times)

Offline diegolima

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Hi there.
I'm trying to figure out if there is any way to set a keyword like "vertical" or "horizontal" based on width and height.
I usually shoot horizontal/landscape, so I set "horizontal" as a keyword by default. But sometimes when I'm shooting and sending fast I tend to forget to change it if I crop it or shoot it vertically.
Is there any way to set this to do it automatically?
(please excuse my poor english)
Many thanks,

Diego.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24223
    • View Profile
    • Camera Bits, Inc.
Re: Horizontal/Vertical keywords based on orientation and/or crop
« Reply #1 on: April 20, 2016, 09:40:03 AM »
Diego,

I'm trying to figure out if there is any way to set a keyword like "vertical" or "horizontal" based on width and height.
I usually shoot horizontal/landscape, so I set "horizontal" as a keyword by default. But sometimes when I'm shooting and sending fast I tend to forget to change it if I crop it or shoot it vertically.
Is there any way to set this to do it automatically?

You could use the {rotation} variable along with Code Replacement to do this.

{rotation} will evaluate to these two values when the image is horizontal:

none, 180

and these two values when the image is vertical:

90 CW, 90 CCW

So you could create a Code Replacement file like so:

none[tab]horizontal
180[tab]horizontal
90 CW[tab]vertical
90 CCW[tab]vertical

Then use your Code Replacement delimiter (default is '\') like so in your IPTC Stationery Pad:

\{rotation}\

And it should evaluate to either "horizontal" or "vertical".

http://wiki.camerabits.com/en/index.php?title=User_Manual_Flat_View#Variables_List
http://wiki.camerabits.com/en/index.php?title=User_Manual_Flat_View#Code_Replacement
http://wiki.camerabits.com/en/index.php?title=User_Manual_Flat_View#Code_Replacement_with_Variables

If your image is not rotated but once cropped appears to be rotated, then the above won't work and I don't have an automated solution for you.

-Kirk