Problems during label creation

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?".
beenwa

Problems during label creation

Post by beenwa »

Hello I have some problems on a command:

convert -background '#000000' \
-fill '#FFFFFF' \
-size 120x \
-font Helvetica \
-gravity Center -wave 5x100 \
-pointsize 72 label:Hello /usr/var/file.png

this command works fine on an old server but doesn't work on a new...

Currently it returns:
CRIT: rangecheck in .setuserparams
Operand stack:
--nostringval-- --nostringval-- --nostringval--
CRIT: rangecheck in .setuserparams
Operand stack:
--nostringval-- --nostringval-- --nostringval--
convert: delegate library support not built-in `/usr/share/fonts/default/Type1/n019003l.pfb' (Freetype) @ warning/annotate.c/RenderFreetype/1449.
convert: Postscript delegate failed `/tmp/magick-XX4erxAH': @ error/ps.c/ReadPSImage/778.
convert: missing an image filename `/var/www/vhosts/host.com/httpdocs/sd_img/captcha/fiche-parcours/20100518112036161.jpg' @ error/convert.c/ConvertImageCommand/2970.


ImageMagick 6.6.1-9 2010-05-18 Q16,
It runs under CentOs Server.

Have you got solutions?

Thanks a lot
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problems during label creation

Post by fmw42 »

looks like you are missing the freetype delegate library

type

convert -list configure

look at line starting with DELEGATES. Does it contain freetype? Here is mine:

DELEGATES bzlib fftw fontconfig freetype gs jpeg jng jp2 lcms lqr mpeg openexr png rsvg tiff x11 xml zlib

Did you install from source or binary? If from binary, you probably don't get freetype automatically. If from source, you have to install all the relevant delegate libraries.

More proper syntax would have -wave just before the output after you finish the label: But does not seem to matter in my tests, which did finish on IM 6.6.1-10 Q16 Mac OSX Tiger
AxelF1983

Re: Problems during label creation

Post by AxelF1983 »

I have nearly the same problem:

When i type this command in the console, it runs:
/usr/local/bin/convert -depth 8 -density 300 -profile libs/imagemagick/USWebCoatedSWOP.icc -profile libs/imagemagick/AdobeRGB1998.icc views/default/images/21_bilder/1/19/199/199684A1 PNG: tmp/944762.png

When i execute the command withe exec in a php file i get the errors:
CRIT: rangecheck in .setuserparams
Operand stack:
--nostringval-- --nostringval-- --nostringval--

But no other errors. But imagemagick dont create the picture.

Anybody have any idea?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems during label creation

Post by snibgo »

If you really have a space after "PNG:", remove it. But you don't need "PNG:" anyway.
snibgo's IM pages: im.snibgo.com
AxelF1983

Re: Problems during label creation

Post by AxelF1983 »

I removed the "PNG". Still the same problem. Same error messages. Here is the full command:

/usr/local/bin/convert -depth 8 -density 300 -profile /srv/www/vhosts/test.myprogram.com/httpdocs/libs/imagemagick/USWebCoatedSWOP.icc -profile /srv/www/vhosts/test.myprogram.com/httpdocs/libs/imagemagick/AdobeRGB1998.icc views/default/images/21_bilder/1/19/199/199684A1 /srv/www/vhosts/test.myprogram.com/httpdocs/./tmp/816716.png
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems during label creation

Post by snibgo »

Your command arguments are in a strange order. The general format is:

convert infile options outfile

Can you post the URL of the file 199684A1? What image type is it?

But these comments don't explain why it works from the console but not PHP. The error message doesn't look like ImageMagick; possibly Ghostscript. "setuserparams" sounds like PostScript. Do you have multiple version of Ghostscript installed?
snibgo's IM pages: im.snibgo.com
AxelF1983

Re: Problems during label creation

Post by AxelF1983 »

It is a EPS file. but it doesnt work with and without extension ".eps".

Yes i have multiple ghostscript version installed. currently i use version 7.05.
the imagemagick version is: 5.5.6 04/01/03 Q16 http://www.imagemagick.org
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems during label creation

Post by snibgo »

Then PHP may be using a different Ghostscript from the command-line.

Your Ghostscript and IM are both old. (7 years old ?!) I suggest you upgrade both.
snibgo's IM pages: im.snibgo.com
AxelF1983

Re: Problems during label creation

Post by AxelF1983 »

Sorry it was the wrong server.

i use these current versions:

ImageMagick 6.6.1-3 2010-04-22 Q16
GPL Ghostscript 8.71 (2010-02-10)

i get still the same Error messages.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems during label creation

Post by snibgo »

One version of Ghostscript, or two? That's the only explanation I can think of for it working from the console but not PHP.
snibgo's IM pages: im.snibgo.com
AxelF1983

Re: Problems during label creation

Post by AxelF1983 »

Yes, i have two GS-Versions installed. usr/local/share/gs/8.71 and usr/share/gs/8.15

How can I use only one? What i have to do, to told imagemagick to use the correct GS-Version?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems during label creation

Post by snibgo »

I don't know GS or PHP (or even Unix) very well, but I suspect the command line uses the local GS, but PHP uses the system GS.

Perhaps PHP can be configured to use local GS.

Or perhaps you should install the latest GS at the system level.
snibgo's IM pages: im.snibgo.com
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Problems during label creation

Post by anthony »

Helvetica is a definate Postscript Font, which means the label generation is going though Ghostscript.

this is rather slow. If you can you should yet to use a TrueType of OpenType font which the 'freetype' library can handle directly.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
AxelF1983

Re: Problems during label creation

Post by AxelF1983 »

snibgo wrote:I don't know GS or PHP (or even Unix) very well, but I suspect the command line uses the local GS, but PHP uses the system GS.

Perhaps PHP can be configured to use local GS.

Or perhaps you should install the latest GS at the system level.
Thank you very much. I installed the latest GS at the system level. now it runs. Thank you for your help and patience!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problems during label creation

Post by snibgo »

Glad it now works. Thanks for letting us know.
snibgo's IM pages: im.snibgo.com
Post Reply