OdImage

Inheritance: java.lang.Object, com.aspose.imaging.DisposableObject, com.aspose.imaging.DataStreamSupporter, com.aspose.imaging.Image, com.aspose.imaging.VectorImage, com.aspose.imaging.VectorMultipageImage

All Implemented Interfaces: com.aspose.internal.fileformats.opendocument.IOdImage

public abstract class OdImage extends VectorMultipageImage implements IOdImage

The open document

Constructors

ConstructorDescription
OdImage(StreamContainer streamContainer, LoadOptions options)Initialize a new OdImage object by providing a stream container along with load options, facilitating seamless integration into software applications.
OdImage(StreamContainer streamContainer)Creates a new instance of the OdImage class, designed specifically for initialization with a stream container.

Methods

MethodDescription
getDefaultPage()Retrieves the default page associated with the image, providing essential access to the primary page within the image collection.
isCached()Obtains a boolean value indicating whether the data of the object is currently cached, thus eliminating the need for data reading.
getBitsPerPixel()Retrieves the count of bits per pixel for the image.
getWidth()Retrieves the width of the image, indicating the horizontal dimension in pixels.
getHeight()Returns the height of the image, denoting the vertical dimension in pixels.
getPageCount()Retrieves the total count of pages within the image.
getMetadata()Retrieves metadata specific to OpenDocument files.
getRecords()Retrieves the OpenDocument records stored within the image.
resize(int newWidth, int newHeight, ImageResizeSettings settings)Adjusts the dimensions of the image according to specified width, height, and resize settings.
resize(int newWidth, int newHeight, int resizeType)This method resizes the image, adjusting both width and height based on the specified dimensions and resize type.
rotateFlip(int rotateFlipType)This method provides functionality to rotate, flip, or perform both operations simultaneously on the image.

OdImage(StreamContainer streamContainer, LoadOptions options)

public OdImage(StreamContainer streamContainer, LoadOptions options)

Initialize a new OdImage object by providing a stream container along with load options, facilitating seamless integration into software applications. This constructor efficiently handle image data, offering flexibility and control over the loading process.

Parameters:

ParameterTypeDescription
streamContainerStreamContainerThe stream.
optionsLoadOptionsThe load options.

OdImage(StreamContainer streamContainer)

public OdImage(StreamContainer streamContainer)

Creates a new instance of the OdImage class, designed specifically for initialization with a stream container. This constructor enables seamless integration with stream-based data sources, facilitating efficient handling of OdImage instances within software systems.

Parameters:

ParameterTypeDescription
streamContainerStreamContainerThe stream container.

getDefaultPage()

public Image getDefaultPage()

Retrieves the default page associated with the image, providing essential access to the primary page within the image collection. This property streamlines navigation and manipulation of image data, enhancing the efficiency of software development workflows.

Returns: Image - the default page.

isCached()

public boolean isCached()

Obtains a boolean value indicating whether the data of the object is currently cached, thus eliminating the need for data reading. This property serves as an optimization indicator, enhancing performance by minimizing redundant data access operation.

Returns: boolean - a value indicating whether object’s data is cached currently and no data reading is required.

getBitsPerPixel()

public int getBitsPerPixel()

Retrieves the count of bits per pixel for the image. This property provides insight into the level of detail and color depth represented in the image, aiding in various image processing tasks and optimizations.

Returns: int - the image bits per pixel count.

getWidth()

public int getWidth()

Retrieves the width of the image, indicating the horizontal dimension in pixels. This property provides essential information about the image’s size, enabling precise rendering, manipulation, and analysis of image data.

Returns: int - the image width in pixels.

getHeight()

public int getHeight()

Returns the height of the image, denoting the vertical dimension in pixels. This property is crucial for understanding the image’s overall size and proportions, facilitating accurate display and processing of image content.

Returns: int - the image height in pixels.

getPageCount()

public int getPageCount()

Retrieves the total count of pages within the image. This property is essential for applications managing multi-page images, enabling them to accurately determine the number of pages available for processing or display.

Returns: int - the page count.

getMetadata()

public final OdMetadata getMetadata()

Retrieves metadata specific to OpenDocument files. This property allows access to essential information embedded within OD files, facilitating various operations such as extraction, modification, or analysis of metadata.

Returns: OdMetadata - the metadata.

getRecords()

public final OdObject[] getRecords()

Retrieves the OpenDocument records stored within the image. This property grants access to specific structured data elements embedded within OpenDocument files, facilitating retrieval or manipulation of relevant information for further processing or analysis.

Returns: com.aspose.imaging.fileformats.opendocument.OdObject[] - the records.

resize(int newWidth, int newHeight, ImageResizeSettings settings)

public void resize(int newWidth, int newHeight, ImageResizeSettings settings)

Adjusts the dimensions of the image according to specified width, height, and resize settings. This method provides flexibility in resizing images while maintaining desired proportions and adhering to defined resize configurations, ensuring accurate adjustment of image dimensions to meet specific requirements or display criteria.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
newHeightintThe new height.
settingsImageResizeSettingsThe resize settings.

resize(int newWidth, int newHeight, int resizeType)

public void resize(int newWidth, int newHeight, int resizeType)

This method resizes the image, adjusting both width and height based on the specified dimensions and resize type. It offers a comprehensive approach to resizing, allowing for precise adjustments while maintaining image quality and integrity. By incorporating the resize type parameter, users can choose from various resizing algorithms or methods to achieve optimal results for different use cases or preferences.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
newHeightintThe new height.
resizeTypeintThe resize type.

rotateFlip(int rotateFlipType)

public void rotateFlip(int rotateFlipType)

This method provides functionality to rotate, flip, or perform both operations simultaneously on the image. It allows users to manipulate the orientation of the image according to their specific requirements. With support for rotation angles and flip directions, it offers flexibility in transforming the image to desired orientations or orientations.

Parameters:

ParameterTypeDescription
rotateFlipTypeintType of the rotate flip.