Re: Imagemagick and orientation tag

Discussion in 'Digital Photography' started by Ofnuts, Feb 16, 2011.

  1. Ofnuts

    Ofnuts Guest

    On 02/15/2011 09:28 PM, Alfred Molon wrote:
    > How to set up the resize command of imagemagick (i.e. "convert -size 400
    > x 300 image.jpg -resize ....") so that it correctly rotates images with
    > an orientation tag?
    >
    > In other words, if you have a vertical image to resize for the web,
    > imagemagick should recognise the orientation tag and rotate vertical
    > images. How to do that with imagemagick?


    Use the -auto-orient function of convert, which does just that, ie:

    convert -size 400> x 300 image.jpg -resize -auto-orient ....
    --
    Bertrand
    Ofnuts, Feb 16, 2011
    #1
    1. Advertising

  2. Ofnuts

    Ofnuts Guest

    On 02/16/2011 11:04 PM, Alfred Molon wrote:
    > In article<4d5c36ae$0$25000$>, Ofnuts says...
    >
    >> Use the -auto-orient function of convert, which does just that, ie:
    >>
    >> convert -size 400> x 300 image.jpg -resize -auto-orient ....

    >
    > That works, but the only problem is that it positions the copyright logo
    > incorrectly. To insert a copyright logo I add this to the convert
    > command:
    >
    > -draw "image Over px,py logox,logoy logo.png"
    >
    > where logox and logoy are width and height of the logo, and px and py
    > are the position of the bottom left corner of the logo.
    >
    > I guess I simply have to swap px and py depending on the orientation
    > tag. Can this be arranged automatically with the orientation command or
    > do I have to read out the orientation tag from the exif?


    Do you auto-orient before the draw or after? Otherwise I would try a mix
    of -gravity and negative coordinates.
    --
    Bertrand
    Ofnuts, Feb 17, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. budyerr

    To vlan tag or not to tag?

    budyerr, Jul 7, 2004, in forum: Cisco
    Replies:
    1
    Views:
    2,295
    Hansang Bae
    Jul 8, 2004
  2. Jim Garrison

    ImageMagick and lossless JPEG rotation?

    Jim Garrison, Sep 30, 2003, in forum: Digital Photography
    Replies:
    8
    Views:
    11,420
    C0mdrData
    Oct 1, 2003
  3. Iain Lea

    Q: Nikon 8800 EXIF orientation tag ?

    Iain Lea, Jun 8, 2005, in forum: Digital Photography
    Replies:
    1
    Views:
    368
    Hans S
    Jun 8, 2005
  4. Jerry West

    Orientation EXIF tag value

    Jerry West, Feb 7, 2006, in forum: Digital Photography
    Replies:
    3
    Views:
    576
  5. Luis Santos

    Exif orientation tag on Olympus cameras

    Luis Santos, Jun 1, 2006, in forum: Digital Photography
    Replies:
    7
    Views:
    552
    Jeremiah DeWitt Weiner
    Jun 2, 2006
Loading...

Share This Page