public class CmxImagePage extends VectorImage implements ICmxImage
The image of CMX page
Image| Constructor and Description |
|---|
CmxImagePage(CmxPage cmxPage)
Initializes a new instance of the
CmxImagePage class. |
| Modifier and Type | Method and Description |
|---|---|
void |
cacheData()
Cache can not be used.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
CmxPage |
getCmxPage()
Gets the CMX page.
|
long |
getFileFormat()
Gets a value of file format
|
float |
getHeightF()
Gets the object height, in inches.
|
float |
getWidthF()
Gets the object width, in inches.
|
boolean |
isCached()
Gets a value indicating whether object's data is cached currently and no data reading is required.
|
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 |
setPalette(IColorPalette palette,
boolean updateColors)
Sets the image palette.
|
getEmbeddedImages, getHeight, getSizeF, getWidthcanLoad, canLoad, canLoad, canLoad, canSave, create, create, create, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getDefaultOptions, 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, getDisposedequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSizeFpublic CmxImagePage(CmxPage cmxPage)
Initializes a new instance of the CmxImagePage class.
cmxPage - The CMX page.public final CmxPage getCmxPage()
Gets the CMX page.
getCmxPage in interface ICmxImagepublic long getFileFormat()
Gets a value of file format
getFileFormat in class ImageFileFormatpublic int getBitsPerPixel()
Gets the image bits per pixel count.
getBitsPerPixel in class Imagepublic boolean isCached()
Gets a value indicating whether object's data is cached currently and no data reading is required.
isCached in class DataStreamSupporterpublic float getWidthF()
Gets the object width, in inches.
getWidthF in interface IObjectWithSizeFgetWidthF in class VectorImagepublic float getHeightF()
Gets the object height, in inches.
getHeightF in interface IObjectWithSizeFgetHeightF in class VectorImagepublic void cacheData()
Cache can not be used.
cacheData in class DataStreamSupporterThe following example shows how to cache all pages of a CMX image.
String dir = "c:\\temp\\";
// Load an image from a CMX file.
com.aspose.imaging.fileformats.cmx.CmxImage image = (com.aspose.imaging.fileformats.cmx.CmxImage) com.aspose.imaging.Image.load(dir + "sample.cmx");
try {
// This call caches only the default page.
image.cacheData();
// Cache all pages so that no additional data loading will be performed from the underlying data stream.
for (com.aspose.imaging.fileformats.cmx.CmxImagePage page : image.getPages()) {
page.cacheData();
}
} finally {
image.dispose();
}
public void resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
public void resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
public void rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
rotateFlip in class ImagerotateFlipType - Type of the rotation and flipping.public void setPalette(IColorPalette palette, boolean updateColors)
Sets the image palette.
setPalette in class Imagepalette - The palette to set.updateColors - if set to true colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.