Creating text with Arc

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
AnandKrish
Posts: 1
Joined: 2011-03-04T04:10:38-07:00
Authentication code: 8675308

Creating text with Arc

Post by AnandKrish »

Hi,

I am using convert command to create a transparent PNG image with the caption provided. Here i am using -distort Arc to give a arc effect to the text. But i am not getting the specified height and width. The height and width of the image is varying based on the Arc angle. Below i have given the command which i am using to create the image.

Code: Select all

convert -size 1100x1300 -background transparent -fill "rgb(0,0,0)" -font Arial.ttf -gravity North caption:'Welcome!!!' -distort Arc 80 text_curve.png
Here i need to create an image exactly of size 1100 x 1300. Please help me in this regard.

Note: if no arc specifed, then image is creating fine with 1100 x 1300 size.

Thanks,
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Creating text with Arc

Post by el_supremo »

One way would be to resize the image back to the correct width and then pad the height.

Code: Select all

convert -size 1100x1300 -background transparent -fill "rgb(0,0,0)" -font Arial.ttf -gravity North 'caption:Welcome!!!' -distort Arc 80 -resize 1100 -extent 1100x1300 text_curve.png
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply