Table of Contents

Class EpsImage

Namespace
Aspose.Imaging.FileFormats.Eps
Assembly
Aspose.Imaging.dll

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.

public sealed class EpsImage : VectorImage, IDisposable, IObjectWithBounds, IObjectWithSizeF
Inheritance
EpsImage
Implements
Inherited Members

Properties

BitsPerPixel

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.

public override int BitsPerPixel { get; }

Property Value

int

Exceptions

NotSupportedException

BoundingBox

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 RectangleF BoundingBox { get; }

Property Value

RectangleF

BoundingBoxPx

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 Rectangle BoundingBoxPx { get; }

Property Value

Rectangle

CreationDate

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 DateTime CreationDate { get; }

Property Value

DateTime

Creator

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 string Creator { get; }

Property Value

string

EpsType

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.

public EpsType EpsType { get; }

Property Value

EpsType

FileFormat

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.

public override FileFormat FileFormat { get; }

Property Value

FileFormat

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 bool HasRasterPreview { get; }

Property Value

bool

Height

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.

public override int Height { get; }

Property Value

int

The image height.

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.

public override bool IsCached { get; }

Property Value

bool

PostScriptVersion

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 PostScriptVersion { get; }

Property Value

string

PreviewImageCount

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 int PreviewImageCount { get; }

Property Value

int

PreviewImages

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 Image[] PreviewImages { get; }

Property Value

Image[]

Title

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 Title { get; }

Property Value

string

Width

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.

public override int Width { get; }

Property Value

int

The image width.

Methods

CacheData()

This method does nothing as the current implementation of the EpsImage class does not involve caching data. While it may not perform any action, understanding this behavior is crucial for developers working with EPS images, ensuring efficient resource management and optimal performance within their applications.

public override void CacheData()

~EpsImage()

protected ~EpsImage()

GetDefaultOptions(object[])

Retrieve default options effortlessly to streamline image processing tasks. Access preconfigured settings to expedite workflow and ensure consistent output quality without manual configuration.

public override ImageOptionsBase GetDefaultOptions(object[] args)

Parameters

args object[]

The arguments.

Returns

ImageOptionsBase

Default options

GetPreviewImage(EpsPreviewFormat)

Retrieves the existing preview image in the specified format or returns null if none is found. This method offers flexibility in accessing preview images tailored to specific formats, optimizing compatibility and resource management within applications.

public Image GetPreviewImage(EpsPreviewFormat format = EpsPreviewFormat.Default)

Parameters

format EpsPreviewFormat

The EPS preview image format.

Returns

Image

The exisiting preview image or null.

Exceptions

ArgumentOutOfRangeException

GetPreviewImages()

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 IEnumerable<Image> GetPreviewImages()

Returns

IEnumerable<Image>

The preview images.

ReleaseManagedResources()

Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.

protected override void ReleaseManagedResources()

Resize(int, int, ImageResizeSettings)

This method resizes the image using predefined settings, allowing for efficient adjustment of dimensions. It provides a convenient way to modify the image size while maintaining control over various parameters, ensuring optimal results for different use cases.

public override void Resize(int newWidth, int newHeight, ImageResizeSettings settings)

Parameters

newWidth int

The new width.

newHeight int

The new height.

settings ImageResizeSettings

The resize settings.

Resize(int, int, ResizeType)

This method resizes the image, adjusting its dimensions according to specified parameters. It offers a straightforward way to modify the size of the image, ensuring flexibility and ease of use for developers.

public override void Resize(int newWidth, int newHeight, ResizeType resizeType)

Parameters

newWidth int

The new width.

newHeight int

The new height.

resizeType ResizeType

The resize type.

RotateFlip(RotateFlipType)

This method facilitates versatile manipulation of the image by enabling rotation, flipping, or both rotation and flipping simultaneously. It offers flexibility in adjusting the orientation of the image to suit specific requirements, enhancing its usability and visual appeal.

public override void RotateFlip(RotateFlipType rotateFlipType)

Parameters

rotateFlipType RotateFlipType

Type of the rotate flip.

Exceptions

NotImplementedException

Currently not implemented by EpsImage

SaveData(Stream)

protected override void SaveData(Stream stream)

Parameters

stream Stream

SetPalette(IColorPalette, bool)

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.

public override void SetPalette(IColorPalette palette, bool updateColors)

Parameters

palette IColorPalette

The palette to set.

updateColors bool

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.

Exceptions

NotSupportedException

Not supported by VectorImage