Manipulating EPS Images

Export EPS images to other formats

         PostScript documents have been adopted for combining text, graphics, and images into graphic files since the 1980s. The combined data is saved in the Encapsulated Postscript format (EPS). EPS files are supported by many vector editing applications and remain popular for creating graphic documents. With the Aspose.Imaging graphic library for Java, you can rapidly develop applications or services to manipulate EPS images.

         You can easily load EPS files and convert them into other image vector or raster formats such as SVG, PNG, PDF, or PSD. In the Java code example provided, we export EPS images to SVG and PNG formats by using the Save method on the loaded EPS image object. For converting to the PNG format, we specify PngColorType.Grayscale as an additional option for a Grayscale PNG palette.

         To export the loaded EPS image to a PDF document, utilize the option parameter `pdfCoreOptions` and specify the required PDF compliance version, such as `PdfA1b`, when saving the PDF file:

Resize EPS images before export

         When working with EPS images, you can perform various operations, such as resizing before exporting to another file format. Apply the `Resize` method to the loaded EPS image object to change the image width and height:

Extract preview image from the EPS files

         Typically, EPS files also contain a low-resolution image preview embedded in the document, enabling other applications to display it. The preview can be stored in various formats within the file. To extract and save the preview image in TIFF, WMF, or JPEG format from an EPS file, utilize the EpsPreviewFormat parameter with the with getPreviewImages() method: