convert creating a totally different image!?!?

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
reck

convert creating a totally different image!?!?

Post by reck »

I'm stumped by this one. I installed imagemagick by following the instructions here

I have some eps files I want to convert to jpgs. When I run the following command it runs without error but oddly it gives me an image that says "The quick brown fox jumps over the lazy dog" at the top along with the alphabet and some other letters. Then the phrase "that which does not destroy me only makes me stronger" repeated at different font sizes. Now the eps image is a totally different image! What the hell is going on here?

$ convert some.eps some.jpg
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert creating a totally different image!?!?

Post by magick »

ImageMagick thinks your image is a Truetype font file. Try this:
  • convert logo: logo.eps
    convert logo.eps logo.jpg
Does that work?
reck

Re: convert creating a totally different image!?!?

Post by reck »

$ convert logo: 178I6495073007.eps
$ convert 178I6495073007.eps j.jpg
sh: gsc: command not found
sh: gsc: command not found
convert: Postscript delegate failed `178I6495073007.eps': No such file or directory @ ps.c/ReadPSImage/737.
convert: missing an image filename `j.jpg' @ convert.c/ConvertImageCommand/2710.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert creating a totally different image!?!?

Post by Bonzo »

I would guess gsc is to do with Ghostscript - did you install that?
reck

Re: convert creating a totally different image!?!?

Post by reck »

yes, you can see the bash script I used to compile everything here
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: convert creating a totally different image!?!?

Post by el_supremo »

A wild guess, but could it be a permissions problem? I notice you installed some of the stuff with sudo and perhaps it has put some of the files in locations which the superuser can reach but which you as an ordinary mortal cannot.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
reck

Re: convert creating a totally different image!?!?

Post by reck »

all the permissions are fine from a quick sanity check.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert creating a totally different image!?!?

Post by fmw42 »

type

convert -list configure

see if the line DELEGATES contains gs (and possibly freetype). If not, then Ghostscript was not fully installed properly. I am not sure if you need freetype as well or not.

I do not know about the use of MacPorts, but I had lots of trouble installing Ghostscript manually on my Mac OSX Tiger. It needed the Ghostscript.Framework and gsc installed. Don't know if this will help.
reck

Re: convert creating a totally different image!?!?

Post by reck »

DELEGATES bzlib freetype gs jpeg png tiff x11 xml zlib
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: convert creating a totally different image!?!?

Post by el_supremo »

It doesn't seem to be finding ghostscript, which it calls "gsc".

Try this command:

Code: Select all

convert -verbose 178I6495073007.eps j.jpg
It should print the path and name of what it thinks is ghostscript.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
reck

Re: convert creating a totally different image!?!?

Post by reck »

$ convert -verbose 178I6495073007.eps j.jpg
"gsc" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g640x480 "-sOutputFile=/var/folders/8I/8IhqawQrF2egZyrkom0Y4GZ9Rdg/-Tmp-/magick-WjtIM1sV" "-f/var/folders/8I/8IhqawQrF2egZyrkom0Y4GZ9Rdg/-Tmp-/magick-ASes0qyb" "-f/var/folders/8I/8IhqawQrF2egZyrkom0Y4GZ9Rdg/-Tmp-/magick-CrXDkGp5"
sh: gsc: command not found
"gsc" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g640x480 "-sOutputFile=/var/folders/8I/8IhqawQrF2egZyrkom0Y4GZ9Rdg/-Tmp-/magick-WjtIM1sV" "-f/var/folders/8I/8IhqawQrF2egZyrkom0Y4GZ9Rdg/-Tmp-/magick-ASes0qyb" "-f/var/folders/8I/8IhqawQrF2egZyrkom0Y4GZ9Rdg/-Tmp-/magick-CrXDkGp5" -c showpage
sh: gsc: command not found
convert: Postscript delegate failed `178I6495073007.eps': No such file or directory @ ps.c/ReadPSImage/737.
convert: missing an image filename `j.jpg' @ convert.c/ConvertImageCommand/2710.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: convert creating a totally different image!?!?

Post by el_supremo »

My last wild guess.
Have a look at the file config/delegates.xml in your ImageMagick installation directory.
Make a backup copy first.

First of all, see if any of the entries in this file refer directly to "gsc" in the "command=" field. If they do, change this to the full path and name of your ghostscript executable.

If not, then you 'll see that quite a few entries have a command entry which begins with ""@PSDelegate@"
Change all occurrences of @PSDelegate@ to the full pathname of your ghostscript and try again.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
Post Reply