Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Digital Photography (http://www.velocityreviews.com/forums/f37-digital-photography.html)
-   -   Re: Imagemagick and orientation tag (http://www.velocityreviews.com/forums/t743662-re-imagemagick-and-orientation-tag.html)

Ofnuts 02-16-2011 08:42 PM

Re: Imagemagick and orientation tag
 
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 02-17-2011 12:02 AM

Re: Imagemagick and orientation tag
 
On 02/16/2011 11:04 PM, Alfred Molon wrote:
> In article<4d5c36ae$0$25000$426a74cc@news.free.fr>, 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


All times are GMT. The time now is 10:29 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.