We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

EPS conversion with resolution and dpi

Hello, Is it possible to convert EPS file to PNG/JPG (any raster type) and set image size. I know that EPS is vector graphic format any available conversion functionality extract image with size embedded in file. I want to convert EPS to image with 300dpi.

@PROCUREMENT2

You can convert EPS to PNG by using Aspose.Page for .NET and specify the image size as well. Please check the below documentation article:

I have following code:

    FileInputStream inputStream = new FileInputStream(inputEPS);
PsDocument document = new PsDocument(inputStream);
PngSaveOptions options = new PngSaveOptions();
ImageDevice device = new ImageDevice(new Dimension(1000, 1000), ImageFormat.PNG);  //    device.setSize(new Dimension(1000, 1000));
device.setSaveOptions(options);
document.save(device, options);
try (FileImageOutputStream fileImageOutputStream = new FileImageOutputStream(
    new File(outputEPS)
)) {
  fileImageOutputStream.write(device.getImagesBytes()[0]);
}

And here is image which I use cow.zip (3.0 MB)
But it does not work as I expected and result image does not match requirements

@PROCUREMENT2

Can you please also share an expected output image file that you want to produce using the API? We will investigate this case accordingly.

I want to have image which contains content of EPS but with expected size. cow.jpg (96.1 KB)

@PROCUREMENT2

We have logged an issue as PAGEJAVA-171 in our issue tracking system. We will further look into its details and keep you posted with the status of its rectification. Please be patient and spare us some time.

We are sorry for the inconvenience.