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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
freesolutions

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

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
freesolutions

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

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
freesolutions

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
Post Reply