convert command fails

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
asheenlevrai
Posts: 5
Joined: 2012-10-30T07:10:26-07:00
Authentication code: 67789

convert command fails

Post by asheenlevrai »

Hello,

I needed to install ImageMagick since I want to use the MEME suite (http://meme.nbcr.net/meme/doc/meme-install.html) and "Glam2" requires the "convert" command to convert .eps files into .png ones.

I installed ImageMagick 6.7.8-8 for Mac OS X Mountain Lion With FreeType support. Requires XQuartz. (8.6MB) from http://www.cactuslab.com/imagemagick/
I already had XQuartz installed (2.7.4)
I checked that convert was present in /opt/ImageMagick/bin
I checked that /opt/ImageMagick/bin was added to my PATH (I did it manually).
I checked that there was no other "convert" command in my PATH.
Everything should be fine...

I tried to run Glam2 but I got the following error message:

Code: Select all

convert: Postscript delegate failed `glam2_out/logo1.eps': No such file or directory @ error/ps.c/ReadPSImage/832.
convert: no images defined `glam2_out/logo1.png' @ error/convert.c/ConvertImageCommand/3044.
Warning: conversion to png format using Image Magick's convert failed.
It seems like Glam2 indeed finds the convert command from ImageMagick, but it fails to use it successfully.
I was wondering if this was due in some way to a requirement of XQuartz.
Should I run XQuartz in the background?
Should I do something else?

Thank you very much in advance for your help.
Best,
-a-
Last edited by asheenlevrai on 2012-10-31T05:29:56-07:00, edited 1 time in total.
asheenlevrai
Posts: 5
Joined: 2012-10-30T07:10:26-07:00
Authentication code: 67789

Re: convert command fails

Post by asheenlevrai »

Any idea anyone?

Is there anything wrong in my reasoning?

I tried to use convert "directly" by running this in the terminal:

Code: Select all

convert logo_ssc1.eps logo.png
it retrieved the same error message:

Code: Select all

convert: Postscript delegate failed `logo_ssc1.eps': No such file or directory @ error/ps.c/ReadPSImage/832.
convert: no images defined `logo.png' @ error/convert.c/ConvertImageCommand/3044.
I don't know what "postscript delegate" means. I'll look into it... Does it mean I need to install ghostscript?

I don't really know how to troubleshoot from here...

Tx again,
-a-
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert command fails

Post by snibgo »

IM relies on a delegate to read and write eqp files.

Try the command "convert -list delegate" for a list of delegates. There should be one in there for eps files, and it will show you the command it will use (probably ghostscript). If it shows no program, or it does but the program doesn't exist, that's the problem.
snibgo's IM pages: im.snibgo.com
asheenlevrai
Posts: 5
Joined: 2012-10-30T07:10:26-07:00
Authentication code: 67789

Re: convert command fails

Post by asheenlevrai »

thank you :)

Code: Select all

         ps<=>eps       "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=epswrite" "-sOutputFile=%o" "-f%i"
I guess this means I need to install ghostscript... right?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert command fails

Post by Bonzo »

Yes you need Ghostscript to work with postscript files.
asheenlevrai
Posts: 5
Joined: 2012-10-30T07:10:26-07:00
Authentication code: 67789

Re: convert command fails

Post by asheenlevrai »

Thanks,

I just installed ghostcript 9.0.6 from here:
http://pages.uoregon.edu/koch/

Now when I run a glam2 command, convert works (every .eps file is converted into a .png file). However, at the end, I get this error message:

Code: Select all

Warning: failed to convert output to HTML!
There is a glam2.html file in the glam2_out directory and it looks OK (I can't tell for sure though)

Is there a way for me to know what causes this error message?
Tx
-a-
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: convert command fails

Post by Bonzo »

That does not look like an Imagemagick or Ghostscript error so I assume it is a glam2 one.

If the html page is created OK I would say it is a bug in the code that either checks for the html page or is getting a false return from another part of the code.
asheenlevrai
Posts: 5
Joined: 2012-10-30T07:10:26-07:00
Authentication code: 67789

Re: convert command fails

Post by asheenlevrai »

doesn't it look like it is a "convert" error?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert command fails

Post by fmw42 »

you need another delegate to work with html. I think, but am not sure, it is xml
Post Reply