Table of Contents

Class OdgImage

Namespace
Aspose.Imaging.FileFormats.OpenDocument
Assembly
Aspose.Imaging.dll

Manipulate OpenDocument Graphic (ODG) vector image file format with our API, widely used by OpenOffice and LibreOffice Draw applications for storing drawing elements in a vector format. Seamlessly parse documents, access pages, resize and rotate images, ensuring efficient processing and customization of ODG files to meet your specific requirements.

public class OdgImage : OdImage, IDisposable, IObjectWithBounds, IObjectWithSizeF, IMultipageImage
Inheritance
OdgImage
Implements
Inherited Members

Constructors

OdgImage(StreamContainer)

Crafted for seamless integration into software solutions, the OdgImage constructor initializes a new instance by leveraging a stream container. This method ensures efficient handling of ODG image data within software environments, optimizing resource utilization and facilitating streamlined image processing workflows.

public OdgImage(StreamContainer streamContainer)

Parameters

streamContainer StreamContainer

The stream container.

OdgImage(StreamContainer, LoadOptions)

Start a new creation of the OdgImage class object with the initiation of a fresh instance. Harness the potential of a stream container coupled with load options parameters, maintain a versatile constructor to seamlessly load images. This constructor empowers efficient image handling, offering customizable loading configurations for enhanced adaptability and performance across diverse scenarios.

public OdgImage(StreamContainer streamContainer, LoadOptions options)

Parameters

streamContainer StreamContainer

The stream.

options LoadOptions

The load options

Properties

FileFormat

Gets a value of file format

public override FileFormat FileFormat { get; }

Property Value

FileFormat

PageExportingAction

This property allows to effortlessly retrieve or modify the action associated with exporting pages. Through precise manipulation of this property, software solutions gain the flexibility to tailor page exporting behavior according to specific application requirements, ensuring optimal performance and enhanced user experience. Please note that setting this method will automatically release page resources after it is executed. It will be executed just before each page is saved.

public override PageExportingAction PageExportingAction { get; set; }

Property Value

PageExportingAction

The page exporting action.

Pages

Retrieving the collection of pages, this property empowers to access the entirety of pages associated with an image. By accessing this property, developers can iterate through individual pages, retrieve specific pages based on their index, or perform batch operations on the entire collection.

public override Image[] Pages { get; }

Property Value

Image[]

The pages.

Methods

GetDefaultOptions(object[])

This property provides access to the default options associated with an image. By retrieving these options, developers can quickly ascertain the default settings applied to the image, facilitating the creation of new instances or the modification of existing ones based on these presets.

public override ImageOptionsBase GetDefaultOptions(object[] args)

Parameters

args object[]

The arguments.

Returns

ImageOptionsBase

Default options

Resize(int, int, ImageResizeSettings)

This method helps developers to resize images programmatically. By invoking this function, you can dynamically adjust the dimensions of images, catering to specific requirements or constraints within their applications.

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 facilitates image resizing with precise control over width, height, and resize type parameters. You can specify the desired dimensions and choose from different resizing algorithms or types to achieve optimal results based on application's requirements.

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 versatile method apply various transformations to images, including rotation and flipping, to achieve desired orientations and visual effects. With intuitive parameters, you can specify the degree of rotation and the type of flipping (horizontal, vertical, or both) to precisely manipulate the image as needed.

public override void RotateFlip(RotateFlipType rotateFlipType)

Parameters

rotateFlipType RotateFlipType

Type of the rotate flip.