This project has moved and is read-only. For the latest updates, please go here.

Loading eps file with tiff preview only loads preview

Jan 16, 2014 at 3:03 PM
Opening an eps file with an embedded tiff preview appears to be opening the preview tiff image and not the actual file.

ImageMagick.MagickImage img = new ImageMagick.MagickImage("test.eps");
returns an MagickImage object with these properties: Ept 212x233 8-bit CMYK 193.05kB

identify.exe "C:\test.eps" -verbose returns
Format: EPT (Encapsulated PostScript with TIFF preview)
Class: DirectClass
Geometry: 895x984+0+0
Base geometry: 898x988
Resolution: 304x304
Print size: 2.94408x3.23684
Units: Undefined
Type: ColorSeparation
Endianess: Undefined
Colorspace: CMYK
Depth: 8-bit

Doing a convert.exe "C:\test.eps" -alpha transparent -clip -alpha opaque "C:\foo.png" returns the full size result. Doing the same via C# returns the small version.

Is there any way to get the full file instead of the preview?
Jan 16, 2014 at 3:37 PM
Edited Jan 16, 2014 at 3:42 PM
Can you add a link to your image? Feel free to contact me through CodePlex if you don't want to publicly share your image.
Jan 16, 2014 at 3:55 PM
I sent you a link to the file.

I upgraded my version of ImageMagick from 6.5.3 to 6.8.8 and now convert.exe does the same thing.

The verbose output is:

EPT 898x988=>212x233 212x233+0+0 8-bit sRGB 120KB 0.172u 0:00.076

So it knows the full size of the image, but then it shrinks it.
Jan 16, 2014 at 7:47 PM
The 898x988 dimensions are the size with the DPI applied. If you want to get a larger image you should use the MagickReadSettings class and specify the Density.
MagickReadSettings settings = new MagickReadSettings();
settings.Density = new MagickGeometry(300, 300); // You can change this to get a better image.

using (MagickImage image = new MagickImage("test.eps", settings))
Jan 16, 2014 at 8:00 PM
Got it. Thanks for your help.