|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.imaging.DisposableObject
com.aspose.imaging.DataStreamSupporter
com.aspose.imaging.Image
com.aspose.imaging.RasterImage
public abstract class RasterImage
Represents a raster image supporting raster graphics operations.
Constructor Summary | |
---|---|
protected |
RasterImage()
Initializes a new instance of the RasterImage class. |
protected |
RasterImage(IColorPalette colorPalette,
boolean useCompactPalette)
Initializes a new instance of the RasterImage class. |
Method Summary | |
---|---|
double |
getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this RasterImage . |
Color |
getPixel(int x,
int y)
Gets an image pixel. |
double |
getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this RasterImage . |
Color[] |
loadPixels(Rectangle rectangle)
Loads pixels. |
protected abstract Color[] |
loadPixelsInternal(Rectangle rectangle)
Loads pixels (format specific method). |
Color[] |
readScanLine(int scanLineIndex)
Reads the whole scan line by the specified scan line index. |
protected void |
releaseManagedResources()
Releases the managed resources. |
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image. |
protected void |
rotateFlip(Color[] rotatedPixels,
int newWidth,
int newHeight)
Performs (completes) rotate, flip or both rotate and flip operation. |
void |
rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image. |
void |
savePixels(Rectangle rectangle,
Color[] pixels)
Saves the pixels. |
protected abstract void |
savePixelsInternal(Rectangle rectangle,
Color[] pixels)
Saves pixels (format specific method). |
void |
setHorizontalResolution(double value)
Sets the horizontal resolution, in pixels per inch, of this RasterImage . |
void |
setPalette(IColorPalette palette,
boolean updateColors)
Sets the image palette. |
void |
setPixel(int x,
int y,
Color color)
Sets an image pixel for the specified position. |
void |
setResolution(double dpiX,
double dpiY)
Sets the resolution for this RasterImage . |
void |
setVerticalResolution(double value)
Sets the vertical resolution, in pixels per inch, of this RasterImage . |
void |
writeScanLine(int scanLineIndex,
Color[] pixels)
Writes the whole scan line to the specified scan line index. |
Methods inherited from class com.aspose.imaging.Image |
---|
canLoad, canLoad, canLoad, canLoad, canSave, create, getBitsPerPixel, getBounds, getContainer, getFileFormat, getFileFormat, getFitRectangle, getFitRectangle, getFittingRectangle, getFittingRectangle, getHeight, getImageLoaderDescriptorName, getPalette, getSize, getUseCompactPalette, getWidth, load, load, onCompactPaletteUsageChanged, onPaletteChanged, onPaletteChanging, resize, save, save, save, setContainer, setPalette, setUseCompactPalette |
Methods inherited from class com.aspose.imaging.DataStreamSupporter |
---|
flush, getDataStreamContainer, onDataStreamContainerChanging, save, save, setDataStreamContainer |
Methods inherited from class com.aspose.imaging.DisposableObject |
---|
dispose, getDisposed, releaseUnmanagedResources, verifyNotDisposed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RasterImage()
Initializes a new instance of the RasterImage
class.
protected RasterImage(IColorPalette colorPalette, boolean useCompactPalette)
Initializes a new instance of the RasterImage
class.
colorPalette
- The color palette.useCompactPalette
- if set to true
compact palette is used.Method Detail |
---|
public double getHorizontalResolution()
Gets the horizontal resolution, in pixels per inch, of this RasterImage
.
public Color getPixel(int x, int y)
Gets an image pixel.
x
- The pixel x location.y
- The pixel y location.
public double getVerticalResolution()
Gets the vertical resolution, in pixels per inch, of this RasterImage
.
public Color[] loadPixels(Rectangle rectangle)
Loads pixels.
rectangle
- The rectangle to load pixels from.
protected abstract Color[] loadPixelsInternal(Rectangle rectangle)
Loads pixels (format specific method).
rectangle
- The rectangle to load pixels from.
public Color[] readScanLine(int scanLineIndex)
Reads the whole scan line by the specified scan line index.
scanLineIndex
- Zero based index of the scan line.
protected void releaseManagedResources()
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
releaseManagedResources
in class DataStreamSupporter
public void resize(int newWidth, int newHeight, int resizeType)
Resizes the image.
resize
in class Image
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.protected void rotateFlip(Color[] rotatedPixels, int newWidth, int newHeight)
Performs (completes) rotate, flip or both rotate and flip operation. This method is called to update the data stream.
rotatedPixels
- The already rotated pixels.newWidth
- The new estimated width.newHeight
- The new estimated height.public void rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
rotateFlip
in class Image
rotateFlipType
- The rotate flip type.public void savePixels(Rectangle rectangle, Color[] pixels)
Saves the pixels.
rectangle
- The rectangle to save pixels to.pixels
- The pixels array.protected abstract void savePixelsInternal(Rectangle rectangle, Color[] pixels)
Saves pixels (format specific method).
rectangle
- The rectangle to save pixels to.pixels
- The pixels array.public void setHorizontalResolution(double value)
Sets the horizontal resolution, in pixels per inch, of this RasterImage
.
public void setPalette(IColorPalette palette, boolean updateColors)
Sets the image palette.
setPalette
in class Image
palette
- 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.public void setPixel(int x, int y, Color color)
Sets an image pixel for the specified position.
x
- The pixel x location.y
- The pixel y location.color
- The pixel color for the specified position.public void setResolution(double dpiX, double dpiY)
Sets the resolution for this RasterImage
.
dpiX
- The horizontal resolution, in dots per inch, of the RasterImage
.dpiY
- The vertical resolution, in dots per inch, of the RasterImage
.public void setVerticalResolution(double value)
Sets the vertical resolution, in pixels per inch, of this RasterImage
.
public void writeScanLine(int scanLineIndex, Color[] pixels)
Writes the whole scan line to the specified scan line index.
scanLineIndex
- Zero based index of the scan line.pixels
- The pixel colors array to write.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |