Mantis - graphicsmagick
Viewing Issue Advanced Details
5153 packaging major always 2014-02-26 08:17 2014-03-04 10:09
wcohrs  
laurent  
normal  
closed  
won't fix  
none    
none  
0005153: gm convert: No decode delegate for postscript
SunOS 5.10 Generic_150401-07 i86pc i386 i86pc

gm convert test.ps test.jpg
gm convert: No decode delegate for this image format (test.ps).

GraphicsMagick 1.3.18 2013-03-10 Q16 http://www.GraphicsMagick.org/ [^]

pkginfo | grep CSW | grep ghost
application CSWghostscript ghostscript - PostScript and PDF interpreter
application CSWghostscript-fonts ghostscript_fonts - Fonts and AFMs for use with GhostScript
application CSWgs ghostscript_stub - Transitional package. Content moved to CSWghostscript
application CSWgsfonts gsfonts_stub - Transitional package. Content moved to CSWghostscript-fonts


the old version work

GraphicsMagick 1.3.12 2010-03-08 Q8 http://www.GraphicsMagick.org/ [^]
jpg file icon GraphicsMagick1.3.12.jpg [^] (10,979 bytes) 2014-02-26 15:21
jpg file icon ImageMagick6.8.8-1.jpg [^] (19,029 bytes) 2014-02-26 15:22
jpg file icon gs.jpg [^] (15,948 bytes) 2014-02-26 15:25
? file icon input.ps [^] (25,127 bytes) 2014-02-27 07:29
png file icon test.png [^] (7,304 bytes) 2014-02-27 10:05
Issue History
2014-02-26 08:17 wcohrs New Issue
2014-02-26 14:07 laurent Note Added: 0010733
2014-02-26 14:14 wcohrs Note Added: 0010734
2014-02-26 15:16 laurent Note Added: 0010735
2014-02-26 15:21 wcohrs File Added: GraphicsMagick1.3.12.jpg
2014-02-26 15:22 wcohrs File Added: ImageMagick6.8.8-1.jpg
2014-02-26 15:25 wcohrs File Added: gs.jpg
2014-02-26 15:27 wcohrs Note Added: 0010736
2014-02-26 22:21 laurent Note Added: 0010737
2014-02-27 07:29 wcohrs File Added: input.ps
2014-02-27 07:31 wcohrs Note Added: 0010738
2014-02-27 10:03 laurent File Added: test.png
2014-02-27 10:04 laurent File Deleted: test.png
2014-02-27 10:05 laurent File Added: test.png
2014-02-27 10:09 laurent Note Added: 0010739
2014-02-27 10:58 wcohrs Note Added: 0010740
2014-03-04 10:07 laurent Note Added: 0010746
2014-03-04 10:07 laurent Status new => assigned
2014-03-04 10:07 laurent Assigned To => laurent
2014-03-04 10:09 laurent Note Added: 0010747
2014-03-04 10:09 laurent Status assigned => closed
2014-03-04 10:09 laurent Resolution open => won't fix

Notes
(0010733)
laurent   
2014-02-26 14:07   
I see the issue, but I believe it's a GM issue.
I've checked that it picks up the correct ghostcript during build time.
A bump to the latest revision has the same issue.

truss shows it opens the ma
10142: open64("/opt/csw/lib/GraphicsMagick-1.3.19/config/delegates.mgk", O_RDONLY) = 3
/opt/csw/bin/pentium_pro/gm convert: No decode delegate for this image format (./Documents/Onera/Documents_2009/interSites.ps).

The content of the mgk file refers to gs, so no clue what's wrong there. Maybe you can try to use the old version to replace this one.
As a workaround, ImageMagick's convert does work.
(0010734)
wcohrs   
2014-02-26 14:14   
i now ImageMagick's convert but the the result looks bad
(0010735)
laurent   
2014-02-26 15:16   
Really? But the backend is the same GS, so it really should look the same.
(0010736)
wcohrs   
2014-02-26 15:27   
i have attached 3 files
the gs.jpg is convertet with
gs -dBATCH -dNOPAUSE -sDEVICE=jpeg -sOutputFile=test.jpg cd_ems.ps
(0010737)
laurent   
2014-02-26 22:21   
I see. Can you provide the .ps original too?
(0010738)
wcohrs   
2014-02-27 07:31   
yes
Thank you for your help.
(0010739)
laurent   
2014-02-27 10:09   
Please note that since that's what I use, I'll focus on fixing ImageMagick for now.

I've determined that the issue happens when IM converts the PNG output of gs to JPEG. I think it has a problem handling the transparency of the background.
Keeping it as PNG, the output looks good, but with a transparent background.

Keeping it as PNG is probably the best solution for now, the file is even smaller than the JPEG. It should be possible to set a proper white background too.
(0010740)
wcohrs   
2014-02-27 10:58   
many thanks again for the support
you can close the case
(0010746)
laurent   
2014-03-04 10:07   
After some testing, it seems it's an expected behaviour, though it's not apparent.
The conversion of the transparent PNG rasterized from the PS to a JPG needs parameters. Since the background in your PS is transparent, what you see is the antialias of black letters over nothingness, ie, black. You need to force a white background.

Like this, the output looks good:

convert -background white -flatten input.ps input.jpg

So you'd better force a white background to make it explicit, but of course, I'd still advise to stick with PNG output.

So in summary:
  - there's definitely an issue with GraphicksMagic, and it appears to be upstram
  - at this point, I don't have time to investigate it further
  - ImageMagick works and is an acceptable workaround.
(0010747)
laurent   
2014-03-04 10:09   
Workaround provided.
If anybody wants to work with upstream on the GM issue, feel free to reopen.