Page 1 of 1

convert -caption not work with IM 6.4.5 2008-11-19 Q16

Posted: 2008-12-03T13:18:56-07:00
by freesolutions
Hello.

I'm new in this forum ad my english isn't very good.

The problem is: "convert -caption ...." or "convert caption: ....." doesn't work with version "ImageMagick 6.4.5 2008-11-19 Q16" installed into my hosting server (linux 2.6.18-6-amd64 ; apache 2.0; PHP Version 5.2.0-8+etch13) but in my personal home server (freebsd 6.2; ImageMagick 6.4.3 2008-09-19 Q16; apache 2.0; PHP Version 5.1.6) works very well.

I've followed the instructions at http://www.imagemagick.org/Usage/thumbnails/#polaroid to convert a simple jpg image file to png; this solution create the png image but doesn't show the caption title into polaroid image.

I've tested this simple example at http://www.imagemagick.org/Usage/text/#caption but I didn't get the result that I hoped.

All commands are lauched by PHP script by passthru function.

Is there someone that give me suggestions to resolv this problem?
Is there already a patch to this problem?

Thank you very much.

Re: convert -caption not work with IM 6.4.5 2008-11-19 Q16

Posted: 2008-12-03T22:23:50-07:00
by anthony
first caption: generates an NEW image from the given text.
See http://www.imagemagick.org/Usage/text/#caption

Next -caption sets the caption text meta-data for images that are read AFTER the option is set. Only images read in or create after that option is effected. If no image is read in the setting has no effect!

On the other hand -set caption adds the given text to ALL images in memory that is in the current image sequence. If only one image is in memory then only that image is effected.

The 'caption' meta-data is also read in WITH image data, if that image file format can save that image data. Very few formats allow this. 'label' and 'comment' is much more common.

See IM Examples, Basics, Setting/Changing Image Attributes for more details of this. 'caption' 'label' and 'comment' are all free form string meta-data for images.

The same conventions are also used for -delay, -dispose, and -page (virtual canvas) meta data handling.

-loop however assigns directly to images as a 'output' setting, rather than an 'input' setting.

Re: convert -caption not work with IM 6.4.5 2008-11-19 Q16

Posted: 2008-12-04T05:31:14-07:00
by freesolutions
Thank you very much for your interesting about my problem.

I 've followed your suggestions and your instrunctions but I don't resolved the problem.
This the command script in the hosting server (polaroid without caption) and my personal home test server (polaroid with caption) :
....
$cmd = "convert " .
"-caption 'TEST CAPTION' " .
$_SERVER["DOCUMENT_ROOT"] . "/test/myfoto.jpg " .
"-fill red " .
"-pointsize 15 " .
"-thumbnail 240x240 " .
"-bordercolor Lavender -border 10x10 -density 144 " .
"-gravity center " .
"-pointsize 15 -background black ".
"-polaroid -15 -resize 50% " .
$_SERVER["DOCUMENT_ROOT"] . "/test/polaroid_myfoto.png";

passthru($cmd);
...
I don't understand where I've committed the mistake, because in my personal home test server this code work very well.
Is possible that PHP has got a limit memory usage on hosting server?

Who has any idea or suggestions is welcome and appreciated.
Thank, thank, thank, thank you very much.

Re: convert -caption not work with IM 6.4.5 2008-11-19 Q16

Posted: 2008-12-04T19:32:04-07:00
by anthony
More than likely your ISP provided web server has too old a version of ImageMagick.

Get the version of your ISP's IM and check.

Se Rubble Web for information on getting basic information about your ISP's ImageMagick

Re: convert -caption not work with IM 6.4.5 2008-11-19 Q16

Posted: 2008-12-12T05:22:42-07:00
by freesolutions
Hi, thank a lot yet.

In these days my hosting provider has updated Magicwand to ImageMagick 6.4.7 2008-12-11 Q16 but the problem still remains.

Can you give me another ideas to resolve this problem?

Thanks.

Re: convert -caption not work with IM 6.4.5 2008-11-19 Q16

Posted: 2008-12-12T11:50:00-07:00
by fmw42
I don't work with PHP much, but start with a simpler problem. See if you can just convert one image to another format. Then work up to more complex commands.

Also check your directory permissions.