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, isCached
cacheData, getEmbeddedImages, setPalette
getHeightF, getSizeF, getWidthF
canLoad, 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, setPalette
getDataStreamContainer, save, save, save
close, dispose, getDisposed
public 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 Image
FileFormat
public 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 IMultipageImage
getPageExportingAction
in class VectorMultipageImage
public 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 IMultipageImage
setPageExportingAction
in class VectorMultipageImage
value
- 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 Image
args
- 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 OdImage
rotateFlipType
- Type of the rotate flip.Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.