Hi Friends,
I am facing issue with text position after changing rotation of text on image. Can you please guide / help me to fix the issue?<br/>
Please find attached image for detailed explanation.
Thank You
Position issue after rotating text on image
Re: Position issue after rotating text on image
I notice on Stackoverflow you have posted some Imagick code - if that is what you want to use you should say so here.
I think you will need to use a distort function ( SRT ) instead of a rotation in -annotate. Alternativly you could create the text image, rotate and composite it over the photo.
I think you will need to use a distort function ( SRT ) instead of a rotation in -annotate. Alternativly you could create the text image, rotate and composite it over the photo.
Re: Position issue after rotating text on image
Hi Bonzo,
Thank you so much for your reply. Yes i posted code in stack. Can you please provide some example how to use distort function?
Thanks
Thank you so much for your reply. Yes i posted code in stack. Can you please provide some example how to use distort function?
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Position issue after rotating text on image
To keep the position, you must specify offsets with -gravity center. For example,
Code: Select all
convert -size 300x300 xc:white -fill black -gravity center -font arial -pointsize 24 -annotate +50-50 "some text" tmp.png
Code: Select all
convert -size 300x300 xc:white -fill black -gravity center -font arial -pointsize 24 -annotate 30x30+50-50 "some text" tmp2.png
Re: Position issue after rotating text on image
Thank you so much for your example. I will try