Arc Text Issue In CentOS

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
Samganesh
Posts: 3
Joined: 2013-02-21T07:43:17-07:00
Authentication code: 6789

Arc Text Issue In CentOS

Post by Samganesh »

I have generated imagick arc text in my website by convert command, its working fine in my local system. My local sytem configuration is PHP 5.3.5, Imagick module 2.3.0 with imagemagick version 6.7.1 in Windows. The arc text generated properly in my windows server.

The same command is not working in my development server with following configuration PHP 5.3.6, Imagick module 2.3.0 with imagemagick version 6.7.1 in CentOS 6.3 . When i execute the arc text command in development server, the text is generated without arc. I have used the following command to create a arc text.

convert -font Candice -pointsize 20 label:"Around the World" \ -virtual-pixel Background -background SkyBlue \ -distort Arc 180 \centos_arc_circle_355.jpg

I used the exec command to execute the above command. Please refer with attached images...........

In windows :Image

In centOS :Image


Please help me to fix this bug.

Thanks in advance
Ganesh.S
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Arc Text Issue In CentOS

Post by fmw42 »

convert -font Candice -pointsize 20 label:"Around the World" \ -virtual-pixel Background -background SkyBlue \ -distort Arc 180 \centos_arc_circle_355.jpg
Try removing all the line breaks \ and put it all on one line.

Please verify that your PHP system is working. This command is not valid in Imagick, but could work with PHP exec().

If you have other commands for running it in Imagick, please show those commands in full.

Also be sure to use the latest Imagick. see http://pecl.php.net/package/imagick/3.1.0RC2. Your 2.3 version may not support what you are trying to do.
Samganesh
Posts: 3
Joined: 2013-02-21T07:43:17-07:00
Authentication code: 6789

Re: Arc Text Issue In CentOS

Post by Samganesh »

Thank for your reply.

I corrected the command and its working fine now. Slashes , space and strings are not accepted linux server, I modified command is given below ....

'convert -font amazon-webfont.ttf -pointsize 24 -fill "#339999" -background transparent label:"Suikerbonen" -virtual-pixel Background -background transparent -distort Arc 140 curvetext_1361517205.png '

Thanks once again.............
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Arc Text Issue In CentOS

Post by anthony »

Just remember in PHP the line gets parse three times

Once by PHP (single quote wrapper)
Once by Shell (break up into words using the double quotes
and once by IM, figure out what options you give to perform the image processing.

See IM Examples
APIs and Scripting, PHP using shell commands
http://www.imagemagick.org/Usage/api/#php_shell

It would be nice if in PHP you can do the argument seperation in PHP, so you can aviod the shell and the extra parsing step, but there seems no easy library function to do that without resorting to low level DIY fork() and execle() calls. :-(

If anyone knows a solution, please give, I am not a everyday PHP programmer.

PS: IMv7 has the ability to feed IM commands via a pipeline, and thus avoid the shell completely. It also will allow you to get feed back from images it has read in so the PHP script can then decide the next processing step, or even to looped processing. This technique should work out a lot simpler for PHP ImageMagick programming, though is different to what people would normally be used to.

The new IMv7 image cache daemons should also be useful too, as a way to pass images between multiple PHP scripts.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply