[magick-users] mageMagick Rotation query
Anthony Thyssen
anthony at griffith.edu.au
Thu Oct 4 17:29:52 PDT 2007
"Ravinderjit Singh. Sidhu" on wrote...
| Dear ImageMagick Friends,
| =20
| I need your help!
| =20
| I am trying Rotation in windows platfom on command line:
| ------------------------------------------------------------------------
| -----------
| convert -size 2100x1200 xc:white ^
| ( -font arial -pointsize 105 -fill rgb(255,0,0) -draw " rotate +0
| text 100, 100 '1.ImageMagick'" ) ^
| ( -font arial -pointsize 105 -fill rgb(0,0,0) -draw " rotate +5
| text 100, 100 '1.ImageMagick'" ) ^
| ( -font arial -pointsize 105 -fill rgb(2550,0,0) -draw " rotate +0
| text 100, 900 '2.ImageMagick'" ) ^
| ( -font arial -pointsize 105 -fill rgb(0,0,0) -draw " rotate +5
| text 100, 900 '2.ImageMagick'" ) ^
| output.BMP
| =20
| Output
| ----------
| Output.bmp shows two black text lines ("ImageMagicK") at 100,100
| location and another at 100,900 location.
| Rotation of both the text is "+5".
| But the rotation effect of second line is different with first line (Why
| so?)
| and How i can get the good desired result (Please suggest me)
| =20
| Thanks and Regards
| Ravinderjit Singh Sidhu
Take a step back and try one step at a time...
First parenthesis are not needed as you are only dealing with one image
you are not trying to modify one image separatally to other images in
memory.
OKAY I see your problem....
The "rotate" setting in draw is NOT a text rotate, but a
WHOLE CANVAS ROTATE
See IM Examples, Annotating Images, Text Rotation with Translation
http://imagemagick.org/Usage/annotating/#text_rotation
Also see Draw, Warping the Drawing Surface
http://imagemagick.org/Usage/draw/#transform
What you want is to either translate then rotate (the canvas) as shown
in the first link above. OR use annotate to rotate the test BEFORE
it 'draws' it.
http://imagemagick.org/Usage/text/#annotate
It is also a lot simplier than using "draw"
here is a cleaned up version.
convert -size 2100x1200 xc:white -font arial -pointsize 105 \
-fill red -annotate 0x0+100+100 "1.ImageMagick" \
-fill black -annotate 5x5+100+100 "1.ImageMagick" \
-fill red -annotate 0x0+100+900 "2.ImageMagick" \
-fill black -annotate 5x5+100+900 "2.ImageMagick" \
win:
The "win:" output displays directly on your screen rather than to a
file. Under UNIX you can use "x:" as well.
PS: Next time use a SMALLER image for testing!!
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
"Violence never solves anything." --- Attila the Hun.
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list