Page 1 of 1

Center Text On Image

Posted: 2012-04-30T08:57:39-07:00
by agriz
Hi

I want to center the text on Image (Horizontal Center)
But the vertical position of the text will be in various place.

How do i do that?

Thanks

Re: Center Text On Image

Posted: 2012-04-30T09:07:11-07:00
by Bonzo
I would use -gravity center to center it then move it up and dow - you do not say how you are writting the text as unsing -annotate you could -annotate +0+100 with -gravity

Re: Center Text On Image

Posted: 2012-04-30T09:22:04-07:00
by agriz
I thought we can't use annotate while using gravity center.

Can i use negative values in annotate?

Thanks

Re: Center Text On Image

Posted: 2012-04-30T09:36:50-07:00
by Bonzo
I am lost with the gravity business but think it should work in this situation BUT the text you are writting may be centered. Just try it and see - yes you can use negative values for -annotate

Re: Center Text On Image

Posted: 2012-04-30T09:43:54-07:00
by agriz
Yes, It is working... :)

Re: Center Text On Image

Posted: 2012-04-30T18:27:25-07:00
by anthony
as the vertical location is variable I would use 'North' gravity for horizontal centering then Y offset for vertical placement (specifying the gap between text and top of image).