Page 1 of 1

Unable to read width and Height from EPS

Posted: 2010-07-16T05:07:35-07:00
by Hottice
Hi all,
I am having some problems with certain .EPS files. most of the files work great but some files seem to be missing data. If run the identify in the command prompt i get the following message:
:\Users\marcel\Desktop>identify -format "%w %h" Pierre.eps
identify: InsufficientImageDataInFile `Pierre.eps' @ warning/ept.c/ReadEPTImage/221.
identify: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=bmpsep8" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g582x582 "-sOutputFile=C:/Users/marcel/AppData/Local/Temp/magick-lSBt7ziB"
"-fC:/Users/marcel/AppData/Local/Temp/magick-Uv0Cj5CA" "-fC:/Users/marcel/AppData/Local/Temp/magick-fV4zcVJn" @ error/utility.c/SystemCommand/1982.
identify: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=bmpsep8" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g582x582 "-sOutputFile=C:/Users/marcel/AppData/Local/Temp/magick-lSBt7ziB"
"-fC:/Users/marcel/AppData/Local/Temp/magick-Uv0Cj5CA" "-fC:/Users/marcel/AppData/Local/Temp/magick-fV4zcVJn" -c showpage @ error/utility.c/SystemCommand/1982.
identify: Postscript delegate failed `C:/Users/marcel/AppData/Local/Temp/magick-0NSVT83N': No such file or directory @ error/ps.c/ReadPSImage/766.
identify: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g612x792 "-sOutputFile=C:/Users/marcel/AppData/Local/Temp/magick-JnjMHSOH
" "-fC:/Users/marcel/AppData/Local/Temp/magick-KpwlFVO9" "-fC:/Users/marcel/AppData/Local/Temp/magick-KCAXC2vg" @ error/utility.c/SystemCommand/1982.
identify: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g612x792 "-sOutputFile=C:/Users/marcel/AppData/Local/Temp/magick-JnjMHSOH
" "-fC:/Users/marcel/AppData/Local/Temp/magick-KpwlFVO9" "-fC:/Users/marcel/AppData/Local/Temp/magick-KCAXC2vg" -c showpage @ error/utility.c/SystemCommand/1982.
identify: Postscript delegate failed `Pierre.eps': No such file or directory @ error/ps.c/ReadPSImage/766.

The things i found out so far is that the eps files that work start with a sertain hex code C5 D0 D3 C6 while the ones that don't work do not start with thes values.

the file that does not work is here:

http://dl.dropbox.com/u/348279/Pierre.eps

Hope someone can enlighten me about this problem.

Yours sincerely,

Marco

Re: Unable to read width and Height from EPS

Posted: 2010-07-16T05:40:49-07:00
by Bonzo
I got lost as to which type of file is which while reading this:
The EPS file type is primarily associated with 'Encapsulated PostScript'. There are two distinct types of .EPs files, one of which is a vector based graphics file and can be opened and easily edited for type, color, etc. in Adobe Illustrator or PC vector based programs like Corel Draw. They can be CMYK color, or flat pantone color based. These files could be "placed' or "imported" into Pagemaker (or Word, Quark, etc.), but not opened by it. They can be almost infinitely scaled in size without degrading the output because they are vector based. The other is an .EPS photo file, flattened, set resolution "picture" type file. It can be opened in PhotoShop or other image editing programs, also placed or imported into Pagemaker (or Word, Quark, etc.), but it will be significantly degraded if scaled beyond the set resolution. These are usually CMYK files, or can be set as Pantone duo-tone, tri-tone files. The initial characters for the EPS format (C5 D0 D3 C6) only works for DOS EPS files. A better magic value (initial characters) may be "%!PS" (25 21 50 53). %!PS does not always appear at the start of the file (though for Unix's ps2epsi it does), but should appear near the start of the file. It should have a version after it, e.g., "%!PS-Adobe-3.0 EPSF-3.0".

Re: Unable to read width and Height from EPS

Posted: 2010-07-16T15:47:19-07:00
by Drarakel
I think, you should get the correct (BoundingBox) value with your command. I'm getting:
identify -format "%w %h" Pierre.eps
582 582

This is with ImageMagick v6.6.3-0 Q16 and GS v8.71, on Windows XP. What versions are you using?
On Windows, I believe, 'identify' only needs the "gsdll32.dll" from GS. Don't know about Unix...

Re: Unable to read width and Height from EPS

Posted: 2010-07-18T22:31:38-07:00
by anthony
Actually EPS files (Encapulated Postscript) often also has a offset as well. I would be very careful with only using width and height.

Re: Unable to read width and Height from EPS

Posted: 2010-07-19T00:38:26-07:00
by Hottice
For IM i have v6.6.3-0 Q16, Windows 7 on my laptop and do not have GhostScript... On the unix servers it does not load any EPS and there is a GS installed with the same imagemagick..

Will have a shot with installing GS to see how things go. will keep you posted and tnx for the help so far :).

Re: Unable to read width and Height from EPS

Posted: 2010-07-19T06:46:09-07:00
by Hottice
Installed GS but still does no work.

Do i need to make any extra configurations before it understands EPS??

Re: Unable to read width and Height from EPS

Posted: 2010-07-19T09:07:32-07:00
by Drarakel
Try a simple "convert -verbose Pierre.eps test.jpg" command on your laptop and post the messages here.

Re: Unable to read width and Height from EPS

Posted: 2010-07-19T10:52:08-07:00
by Hottice
C:\Users\Marco>convert -verbose H:\Pierre.eps H:\test.jpg
"gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitm
ap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTe
xtAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g582x582 "-sOutputFile=C:/Users/
Marco/AppData/Local/Temp/magick-C_p4if5B" "-fC:/Users/Marco/AppData/Local/Temp/m
agick-AIEXcixk" "-fC:/Users/Marco/AppData/Local/Temp/magick-dzV53z79"
"gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitm
ap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTe
xtAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g582x582 "-sOutputFile=C:/Users/
Marco/AppData/Local/Temp/magick-C_p4if5B" "-fC:/Users/Marco/AppData/Local/Temp/m
agick-AIEXcixk" "-fC:/Users/Marco/AppData/Local/Temp/magick-dzV53z79" -c showpag
e
Magick: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -d
NOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVI
CE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g582x582 "-sOu
tputFile=C:/Users/Marco/AppData/Local/Temp/magick-C_p4if5B" "-fC:/Users/Marco/Ap
pData/Local/Temp/magick-AIEXcixk" "-fC:/Users/Marco/AppData/Local/Temp/magick-dz
V53z79" @ error/utility.c/SystemCommand/2093.
Magick: `%s' (%d) "gswin32c.exe" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -d
NOPROMPT -dMaxBitmap=500000000 -dEPSCrop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVI
CE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g582x582 "-sOu
tputFile=C:/Users/Marco/AppData/Local/Temp/magick-C_p4if5B" "-fC:/Users/Marco/Ap
pData/Local/Temp/magick-AIEXcixk" "-fC:/Users/Marco/AppData/Local/Temp/magick-dz
V53z79" -c showpage @ error/utility.c/SystemCommand/2093.
Magick: Postscript delegate failed `H:\Pierre.eps': No such file or directory @
error/ps.c/ReadPSImage/779.
Magick: missing an image filename `H:\test.jpg' @ error/convert.c/ConvertImageCo
mmand/2970.

Path names are correct hope you can help me further.

Re: Unable to read width and Height from EPS

Posted: 2010-07-19T11:20:57-07:00
by Drarakel
Ghostscript can't be found.
ImageMagick first tries to access the registry, but perhaps that is restricted in your Windows. Try to add the Ghostscript 'bin' directory to your path. You should be able to execute 'gswin32c -ver' from the commandline. Then ImageMagick should work, too.

Re: Unable to read width and Height from EPS

Posted: 2010-07-19T23:40:39-07:00
by Hottice
Many thanks !! that worked like a charm. Thanks allot for all the help.