Page 1 of 1

Conversion problem with EPS file

Posted: 2010-07-15T04:37:09-07:00
by rob2020
Hello ImageMagick community,

I am running ImageMagick 6.6.3.0 and have Ghostscript 8.71(classpath is set) installed. My operating system is Windows 7

I have tried to use ImageMagick to convert an eps file to a jpg file, but it fails with the error messages showing below.

The EPS I have used can be found here: http://dl.dropbox.com/u/5230480/1.eps

I have tried doing the conversion without having Ghostscript installed and it came up with the same errors at the end. Therefore I think that it might be a problem within ImageMagick?

Can anyone please help me solve this problem?

Thank you.

rob

Code: Select all

C:\ImageMagick-6.6.3-0>convert C:\1.eps 2.jpg
Error: /undefined in amespacePop
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push   1878   1   3   %oparray_pop   1877   1   3   %oparray_
pop   --nostringval--   1861   1   3   %oparray_pop   1755   1   3   %oparray_po
p   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringv
al--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1161/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 3467311
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
Error: /undefined in amespacePop
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa
lse   1   %stopped_push   1878   1   3   %oparray_pop   1877   1   3   %oparray_
pop   --nostringval--   1861   1   3   %oparray_pop   1755   1   3   %oparray_po
p   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringv
al--   --nostringval--   2   %stopped_push   --nostringval--
Dictionary stack:
   --dict:1161/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 3467311
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
convert: `%s': %s "C:/Program Files/gs/gs8.71/bin/gswin32c.exe" -q -dQUIET -dPAR
ANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignT
oPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBi
ts=4 "-r300x300" -g796x858  "-sOutputFile=C:/Users/rob/AppData/Local/Temp/mag
ick-ycysaaY2" "-fC:/Users/rob/AppData/Local/Temp/magick-P4KYKBbv" "-fC:/Users
/rob/AppData/Local/Temp/magick-rl5XT6Mz" @ error/ps.c/InvokePostscriptDelegat
e/189.
convert: `%s': %s "C:/Program Files/gs/gs8.71/bin/gswin32c.exe" -q -dQUIET -dPAR
ANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignT
oPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBi
ts=4 "-r300x300" -g796x858  "-sOutputFile=C:/Users/rob/AppData/Local/Temp/mag
ick-ycysaaY2" "-fC:/Users/rob/AppData/Local/Temp/magick-P4KYKBbv" "-fC:/Users
/rob/AppData/Local/Temp/magick-rl5XT6Mz" -c showpage @ error/ps.c/InvokePosts
criptDelegate/189.
convert: Postscript delegate failed `C:\1.eps': No such file or directory @ erro
r/ps.c/ReadPSImage/779.
convert: missing an image filename `2.jpg' @ error/convert.c/ConvertImageCommand
/2970.

Re: Conversion problem with EPS file

Posted: 2010-07-15T06:48:40-07:00
by snibgo
The errors at the end just say IM couldn't get a good return from Ghostscript.

Gimp 2.6.8 also fails to open 1.eps. Perhaps the fault lies with the file?

Re: Conversion problem with EPS file

Posted: 2010-07-15T09:23:07-07:00
by rob2020
Hi Snibgo,

Thank you for your reply. I have got many eps files just like this. This file is just an example. I could open the eps file with Photoshop, no problem. I do not have Gimp installed on my machine.

Sorry, but I do not think that the file is the problem here.

Best regards,

Robert

Re: Conversion problem with EPS file

Posted: 2010-07-15T11:49:51-07:00
by Drarakel
You should ask the people at Ghostscript. Ghostscript refuses your file - and ImageMagick can't open EPS files without Ghostscript (Gimp uses Ghostscript, too, I think).

Re: Conversion problem with EPS file

Posted: 2010-07-15T15:43:41-07:00
by snibgo
True, Gimp also uses Ghostscript, so Gimp complaining proves nothing.

Look at the last few lines of 1.eps, and especially the final line:
%%EndBinary
grestore end % Image Trailer grestore
grestore % EPS grestore
[{nextImage} 1 dict begin /Metadata {photoshop_metadata_stream} def currentdict
end /PUT pdfmark
[/NamespacePop pdfmark
amespacePop pdfmark
My knowledge of Postscript is rusty, and I don't have a manual to hand, but I think square brackets should be closed, and amespacePop is meaningless.

Some programs can successfully read bad files by ignoring bad stuff.

Re: Conversion problem with EPS file

Posted: 2010-07-16T03:44:58-07:00
by rob2020
Hi Snibgo,

Thank you for your comments. Your Postscript does not seem to be too rusty, because your comment helped. :)

I opened the eps file with a text editor and deleted the very last line "amespacePop pdfmark". After saving the file, the conversion worked fine.

Also, when opening the file in Photoshop CS4 and resaving it, it removed that line.

Originally the file seems to be have saved in Photoshop CS Macintosh which is a very old version.

Could it be that saving eps files in the wrong format could have been a bug in this version?

Thank you.

rob2020