public final class EpsImage extends VectorImage
The API for Encapsulated PostScript (EPS) image file format support offers robust capabilities for manipulating compositions comprising text, graphics, and images. With features such as bitmap preview image handling, orientation flipping, bounding box retrieval for illustration bounds, resizing, rotating images, and adding preview images, this API ensures seamless processing and integration of EPS files into various applications with precision and versatility.
Convert EPS image to PNG using PostScript rendering.
try (EpsImage image = (EpsImage)Image.load("Sample.eps"))
{
PngOptions options = new PngOptions();
EpsRasterizationOptions epsRasterizationOptions = new EpsRasterizationOptions();
epsRasterizationOptions.setPageWidth(500); // Image width
epsRasterizationOptions.setPageHeight(500); // Image height
epsRasterizationOptions.setPreviewToExport(EpsPreviewFormat.PostScriptRendering); // Render raster image using the PostScript
options.setVectorRasterizationOptions(epsRasterizationOptions);
image.save("Sample.png", options);
}
| Modifier and Type | Method and Description |
|---|---|
void |
cacheData()
This property returns the original bounding box of the
EpsImage
instance in pixels, providing essential geometric data for accurate rendering and
manipulation. |
int |
getBitsPerPixel()
Access the precise bit depth of the image effortlessly with this property.
|
RectangleF |
getBoundingBox()
Accessing the original bounding box in device-independent points, this property
provides crucial geometric information about the
EpsImage dimensions. |
Rectangle |
getBoundingBoxPx()
This property returns the original bounding box of the
EpsImage
instance in pixels, providing essential geometric data for accurate rendering and
manipulation. |
Date |
getCreationDate()
Retrieving the creation date from EPS Document Structuring Conventions (DSC)
comments, this property provides essential metadata indicating the EPS file's
inception.
|
String |
getCreator()
This property offers access to the creator information sourced from EPS Document
Structuring Conventions (DSC) comments found within the EPS file.
|
short |
getEpsType()
Access and interpret the subtype value of your EPS image, streamlining your
workflow and enhancing compatibility across platforms.
|
long |
getFileFormat()
Access the file format of your image with this property.
|
float |
getHeightF()
Access the height of the image using this property.
|
String |
getPostScriptVersion()
This property retrieves the PostScript version associated with the
EpsImage instance. |
Image |
getPreviewImage()
Retrieves the existing preview image in the specified
format or
returns if none is found. |
Image |
getPreviewImage(long format)
Retrieves the existing preview image in the specified
format or
returns if none is found. |
int |
getPreviewImageCount()
Access the number of preview images available with ease.
|
Image[] |
getPreviewImages()
Retrieve the preview images associated with your file.
|
Iterable<Image> |
getPreviewImagesIter()
Accesses the preview images linked to the
EpsImage instance, allowing
seamless retrieval for inspection or utilization in applications. |
InputStream |
getPsStream()
Gets the stream containing the PostScript to execute.
|
String |
getTitle()
This property retrieves the title extracted from the EPS Document Structuring
Conventions (DSC) comments embedded within the EPS file.
|
float |
getWidthF()
Retrieve the width of the image with this convenient property.
|
boolean |
hasRasterPreview()
Discover the presence of a raster preview effortlessly with this property.
|
boolean |
isCached()
This property provides a convenient way to check if the object's data is currently
cached, eliminating the need for additional data reading.
|
void |
setCreationDate(Date value)
Retrieving the creation date from EPS Document Structuring Conventions (DSC)
comments, this property provides essential metadata indicating the EPS file's
inception.
|
void |
setPalette(IColorPalette palette,
boolean updateColors)
Customize image palettes to achieve unique color schemes and enhance visual appeal.
|
crop, getDefaultOptions, getEmbeddedImages, getHeight, getSizeF, getWidth, removeBackground, removeBackground, resize, resize, rotate, rotateFlipcanLoad, canLoad, canLoad, canLoad, canSave, create, create, create, create, create, create, create, crop, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getExifData, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getIProgressEventHandler, getMetadata, getOriginalOptions, getPalette, getProgressEventHandlerInfo, getProportionalHeight, getProportionalWidth, getSerializedStream, getSize, getXmpData, hasBackgroundColor, isAutoAdjustPalette, isUsePalette, load, load, load, load, load, load, removeMetadata, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setBufferSizeHint, setExifData, setInterruptMonitor, setPalette, setXmpData, trySetMetadatagetDataStreamContainer, save, save, saveclose, dispose, getDisposedpublic int getPreviewImageCount()
Access the number of preview images available with ease. This property allows you to effortlessly retrieve the count of preview images associated with your file, enabling efficient management and navigation of your image previews. Ideal for optimizing your workflow and organizing your image assets effectively.
public Image[] getPreviewImages()
Retrieve the preview images associated with your file. This property provides seamless access to the collection of preview images, allowing you to efficiently browse and manage them as needed. Ideal for quickly previewing and selecting the right image for your project.
public long getFileFormat()
Access the file format of your image with this property. Retrieve essential information about the format of your image file, facilitating compatibility and efficient processing. Ideal for identifying the format of your image files for seamless integration into your projects.
getFileFormat in class ImageFileFormatpublic short getEpsType()
Access and interpret the subtype value of your EPS image, streamlining your workflow and enhancing compatibility across platforms. Ideal for optimizing EPS subtype retrieval in your projects with precision and efficiency.
EpsTypepublic boolean hasRasterPreview()
Discover the presence of a raster preview effortlessly with this property. Access
the boolean value indicating whether the EpsImage instance includes a
raster preview, empowering your image processing tasks with clarity and efficiency.
Ideal for streamlining workflow decisions based on the presence or absence of
raster previews in EPS images.
public int getBitsPerPixel()
Access the precise bit depth of the image effortlessly with this property. Retrieve the bits per pixel count, providing crucial insights into the image's color depth and aiding in optimizing processing tasks. Ideal for applications requiring fine-grained control over image manipulation and analysis.
getBitsPerPixel in class Imagecom.aspose.ms.System.NotSupportedException - Not supported by VectorImagepublic float getWidthF()
Retrieve the width of the image with this convenient property. Obtain the image's width effortlessly, facilitating precise layout calculations, scaling operations, and dimension-related tasks within your application. Ideal for ensuring accurate rendering and display of images across various platforms and devices.
getWidthF in interface IObjectWithSizeFgetWidthF in class VectorImagepublic float getHeightF()
Access the height of the image using this property. Obtain the image's height with ease, enabling seamless layout adjustments, aspect ratio calculations, and precise rendering across different screen resolutions and display environments.
getHeightF in interface IObjectWithSizeFgetHeightF in class VectorImagepublic boolean isCached()
This property provides a convenient way to check if the object's data is currently cached, eliminating the need for additional data reading. It offers a quick and efficient method to determine if the required information is readily available, optimizing performance and reducing resource overhead in data-intensive operations.
isCached in class DataStreamSupporterpublic InputStream getPsStream()
Gets the stream containing the PostScript to execute.
public String getPostScriptVersion()
This property retrieves the PostScript version associated with the
EpsImage instance. It offers insight into the specific PostScript
language version utilized within the EPS file, aiding in compatibility assessment
and facilitating seamless integration with PostScript-compatible environments.
public String getTitle()
This property retrieves the title extracted from the EPS Document Structuring Conventions (DSC) comments embedded within the EPS file. It provides valuable metadata about the content of the EPS file, aiding in document organization and identification within compatible software applications.
public String getCreator()
This property offers access to the creator information sourced from EPS Document Structuring Conventions (DSC) comments found within the EPS file. Understanding the creator details provides insights into the software or tool used to generate the EPS file, facilitating compatibility assessment across various platforms and applications.
public Date getCreationDate()
Retrieving the creation date from EPS Document Structuring Conventions (DSC) comments, this property provides essential metadata indicating the EPS file's inception. By accessing this information, users gain insights into the file's origin and chronology, enhancing file management and organization.
public void setCreationDate(Date value)
Retrieving the creation date from EPS Document Structuring Conventions (DSC) comments, this property provides essential metadata indicating the EPS file's inception. By accessing this information, users gain insights into the file's origin and chronology, enhancing file management and organization.
public RectangleF getBoundingBox()
Accessing the original bounding box in device-independent points, this property
provides crucial geometric information about the EpsImage dimensions.
By retrieving this data, users can accurately assess the image's size and aspect
ratio, facilitating precise layout and positioning in various applications.
public Rectangle getBoundingBoxPx()
This property returns the original bounding box of the EpsImage
instance in pixels, providing essential geometric data for accurate rendering and
manipulation. With this information, users can ensure precise placement and sizing
of EPS images in their projects, enhancing overall visual presentation and quality.
public void cacheData()
This property returns the original bounding box of the EpsImage
instance in pixels, providing essential geometric data for accurate rendering and
manipulation. With this information, users can ensure precise placement and sizing
of EPS images in their projects, enhancing overall visual presentation and quality.
cacheData in class DataStreamSupporterpublic Iterable<Image> getPreviewImagesIter()
Accesses the preview images linked to the EpsImage instance, allowing
seamless retrieval for inspection or utilization in applications. This method
provides convenient access to preview images, enhancing user interaction with the
image data.
public Image getPreviewImage()
Retrieves the existing preview image in the specified format or
returns if none is found. This method offers flexibility in
accessing preview images tailored to specific formats, optimizing compatibility and
resource management within applications.
null.public Image getPreviewImage(long format)
Retrieves the existing preview image in the specified format or
returns if none is found. This method offers flexibility in
accessing preview images tailored to specific formats, optimizing compatibility and
resource management within applications.
format - The EPS preview image format.public void setPalette(IColorPalette palette, boolean updateColors)
Customize image palettes to achieve unique color schemes and enhance visual appeal. Tailor colors for specific effects and optimize image quality across different platforms and devices with ease.
setPalette in class Imagepalette - The palette to set.updateColors - if set to true colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.com.aspose.ms.System.NotSupportedException - Not supported by VectorImageCopyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.