Page 1 of 1

magick doesn't respect delegates.xml and breaks with ghostscript 9.27

Posted: 2019-04-19T04:30:05-07:00
by jupsoleil
Hello,

I'm using ImageMagick 7.0.8-34 Q16 x64 2019-03-15 and GS 9.27 (all installed via chocolatey). PDF to png conversion breaks after this upgrade:

magick -debug all c:\temp\magick\redacted.pdf c:\temp\magick\redacted.png
...
2019-04-19T12:46:05+02:00 0:01.387 0.125u 7.0.8 Configure magick.exe[19848]: nt-base.c/NTLocateGhostscript/1222/Configure
Ghostscript (GPL Ghostscript) version 9.27
2019-04-19T12:46:05+02:00 0:01.423 0.125u 7.0.8 Configure magick.exe[19848]: nt-base.c/NTGhostscriptGetString/1321/Configure
registry: "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.27\GS_DLL"="C:\Program Files\gs\gs9.26\bin\gsdll64.dll"
2019-04-19T12:46:05+02:00 0:01.488 0.125u 7.0.8 Exception magick.exe[19848]: utility.c/ShredFile/1843/Exception
Failed to remove: C:/Users/JDE/AppData/Local/Temp/magick-19848QXCblth5bhtq
2019-04-19T12:46:05+02:00 0:01.526 0.125u 7.0.8 Exception magick.exe[19848]: utility.c/ShredFile/1843/Exception
Failed to remove: C:/Users/JDE/AppData/Local/Temp/magick-19848usITQWvTSRmR


I modified the delegates.xml and replaced @PSDelegate@ with C:/Program Files/gs/gs9.26/bin/gswin64c.exe:
magick -list delegate
...
eps<=>pdf "C:/Program Files/gs/gs9.26/bin/gswin64c.exe"
...

But to no avail; exactly the same output is produced by magick! ( Ghostscript (GPL Ghostscript) version 9.27 is in the output, no 9.26)

I modified registry key "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.27\GS_DLL" to "C:\Program Files\gs\gs9.26\bin\gsdll64.dll" and then the pdf conversion worked.

Strangely enough, using ImageMagick-6.9.3-7-portable-Q16-x86, and of course with the registry key pointing back to 9.27, all works, also with GS 9.27:
\ImageMagick-6.9.3-7-portable-Q16-x86>convert -list delegate
...
eps<=>pdf "C:/Program Files/gs/gs9.27/bin/gswin64c.exe"
...
\ImageMagick-6.9.3-7-portable-Q16-x86>convert -debug all c:\temp\magick\redacted.pdf c:\temp\magick\redacted.png
(no errors, conversion OK)

Re: magick doesn't respect delegates.xml and breaks with ghostscript 9.27

Posted: 2019-04-19T12:10:56-07:00
by magick
Download ImageMagick 7.0.8-40. It has a patch to work with Ghostscript 9.27.