Page 1 of 1

Arc Text Issue In CentOS

Posted: 2013-02-21T21:42:00-07:00
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

Re: Arc Text Issue In CentOS

Posted: 2013-02-21T22:20:48-07:00
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.

Re: Arc Text Issue In CentOS

Posted: 2013-02-22T00:27:32-07:00
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.............

Re: Arc Text Issue In CentOS

Posted: 2013-04-03T20:47:25-07:00
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.