public class OdgImage extends OdImage
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.
This example loads a multi-page ODG image.
String dir = "c:\\temp\\";
// Using Aspose.Imaging.Image.Load is a unified way to load image.
com.aspose.imaging.fileformats.opendocument.MultiPageImage image = (com.aspose.imaging.fileformats.opendocument.MultiPageImage) com.aspose.imaging.Image.load(dir + "sample.odg");
try {
// Cast to OdgImage
com.aspose.imaging.fileformats.opendocument.OdgImage odgImage = (com.aspose.imaging.fileformats.opendocument.OdgImage) image;
// Get all pages
com.aspose.imaging.Image[] pages = odgImage.getPages();
// Do some image processing
} finally {
image.dispose();
}
| Constructor and Description |
|---|
OdgImage(StreamContainer streamContainer)
Crafted for seamless integration into software solutions, the
OdgImage
constructor initializes a new instance by leveraging a stream container. |
OdgImage(StreamContainer streamContainer,
LoadOptions options)
Start a new creation of the
OdgImage class object with the
initiation of a fresh instance. |
| Modifier and Type | Method and Description |
|---|---|
long |
getFileFormat()
Easily retrieve the file format value with this user-friendly property.
|
Image[] |
getPages()
Retrieving the collection of pages, this property empowers to access the entirety
of pages associated with an image.
|
getBitsPerPixel, getDefaultPage, getOdMetadata, getPageCount, getRecords, isCachedcacheData, crop, getEmbeddedImages, getHeight, getMetadata, getPageExportingAction, getWidth, removeBackground, removeBackground, resize, resize, rotate, rotateFlip, setPageExportingAction, setPalettegetDefaultOptions, getHeightF, getSizeF, getWidthFcanLoad, canLoad, canLoad, canLoad, canSave, create, create, create, create, create, create, create, crop, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getExifData, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getIProgressEventHandler, 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 OdgImage(StreamContainer streamContainer, LoadOptions options)
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.
streamContainer - The stream.options - The load optionspublic OdgImage(StreamContainer 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.
streamContainer - The stream container.public long getFileFormat()
Easily retrieve the file format value with this user-friendly property. Ideal for developers seeking quick access to information about the file format.
getFileFormat in class ImageFileFormatpublic Image[] getPages()
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.
Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.