gs delegate problem on Windows 64 bit

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.
Post Reply
james

gs delegate problem on Windows 64 bit

Post by james »

Hi,

I've just installed the latest ImageMagick version (ImageMagick-6.5.7-7-Q16-windows-x64-static.exe) on a Windows Server 2003 R2 (Standard x64 Edition Service Pack 2). I also installed the Ghostscript delegate gs870w64.exe. The problem I am getting is concatenating PDFs. These PDFs concatenate work fine on another server so I know it's not my documents. As you can see from the output of "convert -list configure", it appears that GS hasn't been picked up as a delegate. Also as you can see, ImageMagick thinks that I'm using gswin32c.exe instead of the 64 bit version I installed.

My error is:
C:\Documents and Settings\quest>convert "e:\setup\pdf test data\CV-John Doe.pdf"
"e:\setup\pdf test data\Total Costs of Rentil the Portable Office and Stationer
y Required.pdf" "e:\setup\pdf test data"\cecilia.pdf
convert: `%s': %s "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -d
NOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVI
CE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/D
OCUME~1/quest/LOCALS~1/Temp/1/magick-TFwn80aL" "-fC:/DOCUME~1/quest/LOCALS~1/Tem
p/1/magick-h0_fEDQH" "-fC:/DOCUME~1/quest/LOCALS~1/Temp/1/magick-PIzbQTZx" @ uti
lity.c/SystemCommand/1963.
convert: Postscript delegate failed `e:\setup\pdf test data\CV-John Doe.pdf': No
such file or directory @ pdf.c/ReadPDFImage/634.
convert: `%s': %s "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -d
NOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVI
CE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C:/D
OCUME~1/quest/LOCALS~1/Temp/1/magick-_N1AXwfy" "-fC:/DOCUME~1/quest/LOCALS~1/Tem
p/1/magick-YppQhuLK" "-fC:/DOCUME~1/quest/LOCALS~1/Temp/1/magick-YqXso3ig" @ uti
lity.c/SystemCommand/1963.
convert: Postscript delegate failed `e:\setup\pdf test data\Total Costs of Renti
l the Portable Office and Stationery Required.pdf': No such file or directory @
pdf.c/ReadPDFImage/634.



Result of convert -list configure:
C:\Documents and Settings\quest>convert -list configure

Path: [built-in]

Name Value
-------------------------------------------------------------------------------
NAME ImageMagick

Path: configure.xml

Name Value
-------------------------------------------------------------------------------
CC vs8
COPYRIGHT Copyright (C) 1999-2009 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
HOST windows-unknown-linux-gnu
LIB_VERSION 0x657
LIB_VERSION_NUMBER 6,5,7,5
NAME ImageMagick
RELEASE_DATE 2009-11-15
VERSION 6.5.7
WEBSITE http://www.imagemagick.org

Path: E:\aims\imagemagick\ImageMagick-6.5.7-Q16\configure.xml

Name Value
-------------------------------------------------------------------------------
CC vs8
COPYRIGHT Copyright (C) 1999-2009 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
HOST windows-unknown-linux-gnu
LIB_VERSION 0x657
LIB_VERSION_NUMBER 6,5,7,5
NAME ImageMagick
RELEASE_DATE 2009-11-15
VERSION 6.5.7
WEBSITE http://www.imagemagick.org
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: gs delegate problem on Windows 64 bit

Post by magick »

We'll need a few days to investigate this problem.
james

Re: gs delegate problem on Windows 64 bit

Post by james »

Thank you. Some further information for you. I have reinstalled both ImageMagick and Ghostscript but it makes no difference.
One thing I have noticed is that the delegate I downloaded from here http://www.imagemagick.org/download/del ... 870w64.exe when unpacked all the files have 32 in the name (e.g. gswin32c.exe) not 64 as I would expect. Could this be an issue?

Another question: on a 64 bit Windows system, is "x64 static at 16 bits-per-pixel" the best version to run?

thanks again
james

Re: gs delegate problem on Windows 64 bit

Post by james »

Reading a few more postings on the forums here, is there a definitive list anywhere of what Registry settings to expect? This could help me in debugging this.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: gs delegate problem on Windows 64 bit

Post by magick »

Ghostscript sets the 32-bit registry entries on a 64-bit machine. Windows 64 automatically redirects to a node called HKEY_LOCAL_MACHINE/SOFTWARE/Wow6432Node. We had to export the 32-bit Ghostscript registry entries, modify them like this:
  • [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GPL Ghostscript]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\GPL Ghostscript\8.70]
    "GS_DLL"="C:\\Program Files\\gs\\gs8.70\\bin\\gsdll32.dll"
    "GS_LIB"="C:\\Program Files\\gs\\gs8.70\\lib;C:\\Program Files\\gs\\fonts"
and reimport them (just double click on the exported registry file). This problem should not occur if you are using Windows 32-bit or if you install a true 64-bit release of Ghostscript (which may or may not exist at this time).

ImageMagick is not the only package that has this problem, see http://www.oisoft.com/index.pl/freepdf_x64_english.html for another example.
james

Re: gs delegate problem on Windows 64 bit

Post by james »

Magick indeed! That fixed it. Many thanks for your excellent help. :)
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

Re: gs delegate problem on Windows 64 bit

Post by perl@nevcal.com »

I'm getting a similar problem as james.

It seems there is now a 64-bit GPL Ghostscript 8.71, which I just installed.

I actually uninstalled GS, uninstalled IM, then installed the latest 64-bit version of each: GS 8.71 and ImageMagick-6.6.1-7-Q16-windows-x64-static.exe (accidentally, I meant to get the dll version).

Here's my command and beginning of the error stream it produces:

"C:\Program Files\ImageMagick-6.6.1-Q16\convert.exe" xc:white -resize 2456x3000! ( -size 787x300 pattern:checkerboard -threshold 50% -repage 2456x3000+1669+2100 ) -compose multiply -flatten ( -size 787x300 -font Times-Roman -gravity west "label:Lorem ipsum dolor\nsit amet, consectetur\nadipisicing elit, sed\ndo eiusmod tempor" -trim +repage -gravity center -extent 787x300 -repage 2456x3000+1669+2400 ) -compose multiply -flatten ( -size 787x300 -font Times-Roman -gravity west" label:Lorem ipsum dolor sit amet, consectetur\nadipisicing elit, sed do eiusmod tempor" -trim +repage -gravity center -extent 787x300 -repage 2456x3000+1669+2700 ) -compose multiply -flatten -density 300 -compress group4 d:\temp\label-temp.tif

convert.exe: unable to read font `C:\Program Files\ImageMagick-6.6.1-Q16\@ghostscript_font_path@n021003l.pfb' @ error/annotate.c/RenderFreetype/1056.
convert.exe: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g228x24 "-sOutputFile=d:/temp/magick-CanlHQ_v" "-fd:/temp/magick-F93Ii6wL" "-fd:/temp/magick-i94SMib1" @ error/utility.c/SystemCommand/2004.

The registry keys GS installs seem to point to the proper locations (no longer in Program Files (x86), now that there is a 64-bit version).

So when I uninstall the static IM, and install the dll IM (same version otherwise), I get instead the following errors from the same command:

d:\>"C:\Program Files\ImageMagick-6.6.1-Q16\convert.exe" xc:white -resize 2456x3000! ( -size 787x300 pattern:checkerboard -threshold 50% -repage 2456x3000+1669+2100 ) -compose multiply -flatten ( -size 787x300 -font Times-Roman -gravity west "label:Lorem ipsum dolor\nsit amet, consectetur\nadipisicing elit, sed\ndo eiusmod tempor" -trim +repage -gravity center -extent 787x300 -repage 2456x3000+1669+2400 ) -compose multiply -flatten ( -size 787x300 -font Times-Roman -gravity west" label:Lorem ipsum dolor sit amet, consectetur\nadipisicing elit, sed do eiusmod tempor" -trim +repage -gravity center -extent 787x300 -repage 2456x3000+1669+2700 ) -compose multiply -flatten -density 300 -compress group4 d:\temp\label-temp.tif

convert.exe: no decode delegate for this image format `white' @ error/constitute.c/ReadImage/532.
convert.exe: no decode delegate for this image format `checkerboard' @ error/constitute.c/ReadImage/532.
convert.exe: no decode delegate for this image format `Lorem ipsum dolor\nsit amet, consectetur\nadipisicing elit, sed\ndo eiusmod tempor' @ error/constitute.c/ReadImage/532.
convert.exe: missing an image filename `d:\temp\label-temp.tif' @ error/convert.c/ConvertImageCommand/2970.

Help!
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

Re: gs delegate problem on Windows 64 bit

Post by perl@nevcal.com »

Noticed this is still a problem in version 6.6.1-9, which, when it installs, claims to be installing 6.6.1-8 with a date of 2010-06-... (which seems to be in the future, yet, in this timezone; I forget what day it said).

Anyway, it still can't find the Ghostscript fonts, apparently, or whatever the errors mean.
perl@nevcal.com
Posts: 34
Joined: 2009-09-04T11:26:13-07:00
Authentication code: 8675309

Re: gs delegate problem on Windows 64 bit

Post by perl@nevcal.com »

I guess the error messages are different, almost like my install of 6.6.1-7 was a bad install, and this one gives me the errors again that I first saw with an earlier version... here are the error messages, same IM convert command line as above.

Magick: unable to read font `C:\Program Files\ImageMagick-6.6.1-Q16\config\@ghos
tscript_font_path@n021003l.pfb' @ error/annotate.c/RenderFreetype/1056.
Magick: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -d
NOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVI
CE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g228x24 "-sOutput
File=d:/temp/magick-A_A-pjZA" "-fd:/temp/magick-MdQfFNuy" "-fd:/temp/magick-tiFy
LmzA" @ error/utility.c/SystemCommand/2004.
Magick: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -d
NOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVI
CE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g228x24 "-sOutput
File=d:/temp/magick-A_A-pjZA" "-fd:/temp/magick-MdQfFNuy" "-fd:/temp/magick-tiFy
LmzA" -c showpage @ error/utility.c/SystemCommand/2004.
Magick: Postscript delegate failed `d:/temp/magick-QAZq9K24': No such file or di
rectory @ error/ps.c/ReadPSImage/778.
Magick: unable to read font `C:\Program Files\ImageMagick-6.6.1-Q16\config\@ghos
tscript_font_path@n021003l.pfb' @ error/annotate.c/RenderFreetype/1056.
mddilip
Posts: 1
Joined: 2011-09-19T05:29:09-07:00
Authentication code: 8675308

Re: gs delegate problem on Windows 64 bit

Post by mddilip »

The solution that worked for me in 64 bit Windows 7:

I have modified delegates.xml, by replacing all "@PSDelegate@" values with "gswin64c" value. By default, it looks for the "gswin32c" exe file, and I didn't find a place to change this, other than delegates.xml in Image magick install directory.
After the above changes, it is required to set the GS bin path exclusively in environment variables. I have appended the Ghostscript bin location path to the PATH setting by going to My Computer -> Properties -> Environment Variables -> PATH from system variable window.

It was required to restart command prompt to view the effect.
greenosity
Posts: 1
Joined: 2011-09-26T12:33:29-07:00
Authentication code: 8675308

Re: gs delegate problem on Windows 64 bit

Post by greenosity »

mddilip wrote:The solution that worked for me in 64 bit Windows 7:

I have modified delegates.xml, by replacing all "@PSDelegate@" values with "gswin64c" value. By default, it looks for the "gswin32c" exe file, and I didn't find a place to change this, other than delegates.xml in Image magick install directory.
After the above changes, it is required to set the GS bin path exclusively in environment variables. I have appended the Ghostscript bin location path to the PATH setting by going to My Computer -> Properties -> Environment Variables -> PATH from system variable window.

It was required to restart command prompt to view the effect.
That worked for me, too. Thanks.
vielhuber
Posts: 23
Joined: 2010-09-05T15:40:14-07:00
Authentication code: 8675308

Re: gs delegate problem on Windows 64 bit

Post by vielhuber »

Can somebody post a solution for linux ubuntu 10.10 64-bit?
I do have the same problems here.
vielhuber
Posts: 23
Joined: 2010-09-05T15:40:14-07:00
Authentication code: 8675308

Re: gs delegate problem on Windows 64 bit

Post by vielhuber »

Big issues with IM and 64-bit machines:
viewtopic.php?f=3&t=19545
Check out more here.
Post Reply