Postscript delegate failed - regression bug
Posted: 2008-09-03T05:05:41-07:00
Short story: conversion of a PS to JPG (or other formats). ImageMagick-6.2.5 works, ImageMagick-6.3.5 and ImageMagick-6.4.2 fail with the infamous useless "Postscript delegate failed ...: No such file or directory" message.
Having both a working and a failing version available, I nailed it down to a difference in behavior of ImageMagick. This is not dependent on the version of Ghostscript (I tried both with 8.15.4 and with the newest 8.63). The working, older version of ImageMagick invokes gs twice, like that:
On the other hand, the failing, newer versions only make the first gs invocation and then terminate with an error message. However, this first invocation produces a zero-sized output file for some reason (regardless of the ImageMagick version used). Only the second gs produces the desired output.
It seems that it does not happen with all Postscript files. An example input file which does cause trouble can be downloaded from here: https://bi.offis.de/imagemagick_bug/frame_001.ps
Having both a working and a failing version available, I nailed it down to a difference in behavior of ImageMagick. This is not dependent on the version of Ghostscript (I tried both with 8.15.4 and with the newest 8.63). The working, older version of ImageMagick invokes gs twice, like that:
Code: Select all
gs -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g612x792 -r72x72 -sOutputFile=/tmp/magick-XXEgyteI -f/tmp/magick-XXjKAqoW -f/tmp/magicpnVw4t
gs -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g612x792 -r72x72 -sOutputFile=/tmp/magick-XXEgyteI -f/tmp/magick-XXjKAqoW -f/tmp/magicpnVw4t -c showpage
It seems that it does not happen with all Postscript files. An example input file which does cause trouble can be downloaded from here: https://bi.offis.de/imagemagick_bug/frame_001.ps