Page 1 of 1

convert command fails

Posted: 2012-10-30T07:13:17-07:00
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-

Re: convert command fails

Posted: 2012-10-31T05:24:34-07:00
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-

Re: convert command fails

Posted: 2012-10-31T06:47:10-07:00
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.

Re: convert command fails

Posted: 2012-10-31T07:30:25-07:00
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?

Re: convert command fails

Posted: 2012-10-31T08:38:43-07:00
by Bonzo
Yes you need Ghostscript to work with postscript files.

Re: convert command fails

Posted: 2012-10-31T09:31:32-07:00
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-

Re: convert command fails

Posted: 2012-10-31T09:38:04-07:00
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.

Re: convert command fails

Posted: 2012-10-31T09:48:03-07:00
by asheenlevrai
doesn't it look like it is a "convert" error?

Re: convert command fails

Posted: 2012-10-31T11:00:29-07:00
by fmw42
you need another delegate to work with html. I think, but am not sure, it is xml