EPS conversion aborted

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

EPS conversion aborted

Post by kriks »

Hi,

IM 6.9.0-0 ends with Aborted signal (return = 134) for some EPS.

Code: Select all

# convert -version
Version: ImageMagick 6.9.0-0 Q16 x86_64 2014-11-16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype fpx gslib jng jpeg lcms lqr ltdl lzma png ps rsvg tiff webp wmf x xml zlib

Code: Select all

# gs -version
GPL Ghostscript 9.15 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc.  All rights reserved.
Here is the command-line with debug :

Code: Select all

# LC_ALL=C convert -verbose -debug all -units PixelsPerInch -density 406 'T859_405_29_273_00_Ouverte.eps[0]' +repage -auto-orient  -profile Photoshop5DefaultCMYK.icc -profile sRGB_IEC61966-2-1_black_scaled.icc -colorspace 'sRGB' -filter lanczos -resize '110x90' -unsharp 0x1 -format 'JPEG' -compress 'JPEG' -interlace 'line' -type optimize -quality '75' -strip -background 'white' -flatten 'JPEG:8822.jpg' > convert.log 2>&1
Aborted
# echo $?
134
Here is the convert.log : http://kriks.free.fr/IM/convert.log

It also happens with IM 6.9.0-0 + GS 8.70, and with IM 6.8.9-9 + GS 9.10.
It doesn't happen with IM 6.8.7-0 + GS 9.10.

It also happens without any specific option in the command-line.

I can privately provide the file, if needed.

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

Re: EPS conversion aborted

Post by fmw42 »

I suspect to get this resolved you will need to provide your EPS file, so the developers can test with it.
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks »

To whom can I send this file ?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra »

Feel free to PM me if you don't want to publicly share your file. If it is okay to share it publicly use something like Dropbox.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: EPS conversion aborted

Post by pipitas »

Ghostscript developers have deprecated the two traditional devices pswrite and epswrite quite a while ago. These used to generate PostScript Level 1. I'm not sure if they already completely removed support for these in Ghostscript v9.15 (that you seem to be using).

The new replacement devices are called ps2write and eps2write. These generate the more efficient PostScript Level 2.

Is ImageMagick aware of these changes, when installing/defining delegates?
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks »

PM was sent :)
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra »

pipitas wrote: The new replacement devices are called ps2write and eps2write. These generate the more efficient PostScript Level 2.

Is ImageMagick aware of these changes, when installing/defining delegates?
We are talking about reading a pdf file not writing. Not sure what this has to do with this topic.

I can convert your file perfectly on Windows with gs 9.15:

Code: Select all

C:\>convert -verbose -units PixelsPerInch -density 406 T859_405_29_273_00_Ouvert
e.eps[0] +repage -auto-orient -colorspace sRGB -filter lanczos -resize 110x90 -u
nsharp 0x1 -format JPEG -compress JPEG -interlace line -type optimize -quality 7
5 -strip -background white -flatten JPEG:8822.jpg
[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitma
p=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits
=4 -dGraphicsAlphaBits=4 "-r406x406" -g8000x6000 -dFirstPage=1 -dLastPage=1 -dEP
SCrop  "-sOutputFile=C:/Users/Dirk/AppData/Local/Temp/magick-5020qf7r5g6Ms1-d%d"
 "-fC:/Users/Dirk/AppData/Local/Temp/magick-5020xLB97ydOUzOu" "-fC:/Users/Dirk/A
ppData/Local/Temp/magick-50203IzgrhA8Ivln"C:/Users/Dirk/AppData/Local/Temp/magic
k-5020qf7r5g6Ms1-d1 PAM 8000x6000 8000x6000+0+0 8-bit ColorSeparation CMYK 192MB
 1.513u 0:01.531
EPS:C:/Users/Dirk/AppData/Local/Temp/magick-5020IdzKtatzgibM=>C:/Users/Dirk/AppD
ata/Local/Temp/magick-5020IdzKtatzgibM EPS 8000x6000 8000x6000+0+0 16-bit ColorS
eparation CMYK 192MB 0.016u 0:00.019
T859_405_29_273_00_Ouverte.eps[0]=>T859_405_29_273_00_Ouverte.eps EPT 8000x6000
8000x6000+0+0 16-bit ColorSeparation CMYK 192MB 0.016u 0:00.007
T859_405_29_273_00_Ouverte.eps[0]=>8822.jpg EPT 8000x6000=>110x83 110x83+0+0 16-
bit Optimize sRGB 2.14KB 0.078u 0:00.037
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: EPS conversion aborted

Post by pipitas »

dlemstra wrote:
pipitas wrote: The new replacement devices are called ps2write and eps2write. These generate the more efficient PostScript Level 2.

Is ImageMagick aware of these changes, when installing/defining delegates?
We are talking about reading a pdf file not writing. Not sure what this has to do with this topic.
You are right, of course. I am sorry, I was too quick, and not properly paying attention when responding.
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks »

I confirm this works on windows, could this be a weird bug in the linux build ?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra »

Maybe you are linking with an older Ghostscript version?

p.s. I just submitted a patch to our SVN repository to report the Ghostscript library version when an exception is raised or with -verbose:

Code: Select all

D:\>convert -verbose T859_405_29_273_00_Ouverte.eps null:
[ghostscript library 9.15] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMax
Bitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlph
aBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g1419x1064 -dEPSCrop  "-sOutputFile=C:/
Users/Dirk/AppData/Local/Temp/magick-6196RsX7qSr73nvu%d" "-fC:/Users/Dirk/AppDat
a/Local/Temp/magick-6196VpfHZ3yRdrvU" "-fC:/Users/Dirk/AppData/Local/Temp/magick
-6196Eo8Du6Yrq1Rt"C:/Users/Dirk/AppData/Local/Temp/magick-6196RsX7qSr73nvu1 PAM
1419x1064 1419x1064+0+0 8-bit ColorSeparation CMYK 6.039MB 0.031u 0:00.031
EPS:C:/Users/Dirk/AppData/Local/Temp/magick-6196oEqzYPr14jjK=>C:/Users/Dirk/AppD
ata/Local/Temp/magick-6196oEqzYPr14jjK EPS 8000x6000=>1419x1064 1419x1064+0+0 16
-bit ColorSeparation CMYK 6.039MB 0.000u 0:00.000
T859_405_29_273_00_Ouverte.eps EPT 8000x6000=>1419x1064 1419x1064+0+0 16-bit Col
orSeparation CMYK 6.039MB 0.000u 0:00.010
T859_405_29_273_00_Ouverte.eps=> EPT 8000x6000=>1419x1064 1419x1064+0+0 16-bit C
olorSeparation CMYK 6.039MB 0.000u 0:00.010
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
pipitas
Posts: 168
Joined: 2012-07-15T14:06:46-07:00
Authentication code: 15

Re: EPS conversion aborted

Post by pipitas »

dlemstra wrote:I just submitted a patch to our SVN repository to report the Ghostscript library version when an exception is raised or with -verbose:
Very useful addition, thanks a lot!
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks »

dlemstra wrote:Maybe you are linking with an older Ghostscript version?
p.s. I just submitted a patch to our SVN repository to report the Ghostscript library version when an exception is raised or with -verbose:
Thanks, how can I test this patch ?
Meanwhile, is there a way to execute only the ghostscript part of a convert command, in order to see the result, or maybe a better explanation?
The -verbose gives the ghostscript command, but with temporary files, so I can't reproduce it.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra »

The patch is available in our SVN repository and in the beta of ImageMagick 6.9.0-4 today/tomorrow. You should be able to execute Ghostscript like this:

Code: Select all

gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMax
Bitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlph
aBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g1419x1064 -dEPSCrop -sOutputFile=Output.pam -fT859_405_29_273_00_Ouverte.eps
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kriks
Posts: 114
Joined: 2008-01-04T05:52:03-07:00

Re: EPS conversion aborted

Post by kriks »

Thanks, I used this command:

Code: Select all

gs -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g1419x1064 -dFirstPage=1 -dLastPage=1 -dEPSCrop -sOutputFile=Output.pam -fT859_405_29_273_00_Ouverte.eps
Exit status is 0.

The output file seems ok (but it looks like a negative with the display command), and I can successfully convert it to PNG or JPG.
I don't understand what could be going on now...
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: EPS conversion aborted

Post by dlemstra »

Did you check if convert was linked with the correct version of gslib? Maybe it is using an old version?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply