EPS Image Conversion


#1

Hi Team,

How to convert EPS image to PNG image format.
I have tried various format its converted only raster image.

Regards,
Murali


#2

@Muralir,

Can you please share source file so that we may further investigate to help you out.


#3

9780198758778_C002_002.zip (465.9 KB)
Hi Adnan,

Please find the attached source file.

Regards,
Murali


#4

@Muralir,

I have observed your requirements and request you to please visit this documentation link for your reference.


#5

Hi have write below code but still that problem is not resolved.

string dataDir = @“C:\Users\9106056\Desktop\Images”;

        using (EpsImage epsImage = Aspose.Imaging.Image.Load(dataDir + "9780198758778_C002_002.eps") as EpsImage)
        {
            // check if EPS image has any raster preview to proceed (for now only raster preview is supported)
            if (epsImage.HasRasterPreview)
            {
                if (epsImage.PhotoshopThumbnail != null)
                {
                    // process Photoshop thumbnail if it's present
                }

                if (epsImage.EpsType == EpsType.Interchange)
                {
                    // Get EPS Interchange subformat instance
                    EpsInterchangeImage epsInterchangeImage = epsImage as EpsInterchangeImage;

                    if (epsInterchangeImage.RasterPreview != null)
                    {
                        // process black-and-white Interchange raster preview if it's present
                    }
                }
                else
                {
                    // Get EPS Binary subformat instance
                    EpsBinaryImage epsBinaryImage = epsImage as EpsBinaryImage;

                    if (epsBinaryImage.TiffPreview != null)
                    {
                        // process TIFF preview if it's present
                    }

                    if (epsBinaryImage.WmfPreview != null)
                    {
                        // process WMF preview if it's present
                    }
                }

                // export EPS image to PNG (by default, best available quality preview is used for export)
                epsImage.Save(dataDir + "anyEpsFile.png", new PngOptions());
            }

#6

@Muralir,

I have worked with the sample code and EPS file shared and have been able to generate the PNG file. Please check the attached the PNG for your kind reference. I also like to add here that EPS is Vector where as PNG is raster image. Please visit this link for your kind reference.
anyEpsFile.png (2.1 KB)