public class OdgImage extends OdImage
The Open Document Graphic
<inheritdoc></inheritdoc>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)
Initializes a new instance of the
OdgImage class. |
OdgImage(StreamContainer streamContainer,
LoadOptions options)
Initializes a new instance of the
OdgImage class. |
| Modifier and Type | Method and Description |
|---|---|
ImageOptionsBase |
getDefaultOptions(Object[] args)
Gets the default options.
|
long |
getFileFormat()
Gets a value of file format
|
PageExportingAction |
getPageExportingAction()
Gets the page exporting action.
|
Image[] |
getPages()
Gets the pages.
|
void |
resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
|
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
|
void |
rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
|
void |
setPageExportingAction(PageExportingAction value)
Sets the page exporting action.
|
getBitsPerPixel, getDefaultPage, getHeight, getMetadata, getPageCount, getRecords, getWidth, isCachedcacheData, getEmbeddedImages, setPalettegetHeightF, getSizeF, getWidthFcanLoad, canLoad, canLoad, canLoad, canSave, create, create, create, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProgressEventHandler, getProgressEventHandlerInfo, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, isUsePalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setBufferSizeHint, setInterruptMonitor, setPalettegetDataStreamContainer, save, save, saveclose, dispose, getDisposedpublic OdgImage(StreamContainer streamContainer, LoadOptions options)
Initializes a new instance of the OdgImage class.
streamContainer - The stream.options - The load optionspublic OdgImage(StreamContainer streamContainer)
Initializes a new instance of the OdgImage class.
streamContainer - The stream container.public long getFileFormat()
Gets a value of file format
getFileFormat in class ImageFileFormatpublic PageExportingAction getPageExportingAction()
Gets the page exporting action. 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.
Value: The page exporting action.getPageExportingAction in interface IMultipageImagegetPageExportingAction in class VectorMultipageImagepublic void setPageExportingAction(PageExportingAction value)
Sets the page exporting action. 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.
Value: The page exporting action.setPageExportingAction in interface IMultipageImagesetPageExportingAction in class VectorMultipageImagevalue - the page exporting action.public Image[] getPages()
Gets the pages.
Value: The pages.public ImageOptionsBase getDefaultOptions(Object[] args)
Gets the default options.
getDefaultOptions in class Imageargs - The arguments.public void resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
public void resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
public void rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
rotateFlip in class OdImagerotateFlipType - Type of the rotate flip.Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.