public abstract class RasterCachedImage extends RasterImage
Represents a raster image supporting raster graphics operations. This image caches pixel data when required.
Modifier and Type | Method and Description |
---|---|
void |
adjustBrightness(int brightness)
Adjust of a brightness for image.
|
void |
adjustContrast(float contrast)
Image contrasting
|
void |
adjustGamma(float gamma)
Gamma-correction of an image.
|
void |
adjustGamma(float gammaRed,
float gammaGreen,
float gammaBlue)
Gamma-correction of an image.
|
void |
binarizeBradley(double brightnessDifference)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
|
void |
binarizeFixed(byte threshold)
Binarization of an image with predefined threshold
|
void |
binarizeOtsu()
Binarization of an image with Otsu thresholding
|
void |
cacheData()
Caches the data and ensures no additional data loading will be performed from the underlying
DataStreamSupporter.DataStreamContainer . |
void |
crop(com.aspose.cad.Rectangle rectangle)
Cropping the image.
|
void |
dither(int ditheringMethod,
int bitsCount,
com.aspose.cad.IColorPalette customPalette)
Performs dithering on the current image.
|
com.aspose.cad.IColorPalette |
getFormatSpecificPalette()
Gets palette from format-specific places
|
void |
grayscale()
Transformation of an image to its grayscale representation
|
boolean |
isCached()
Gets a value indicating whether image data is cached currently.
|
void |
resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
|
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
|
void |
rotate(float angle,
boolean resizeProportionally,
com.aspose.cad.Color backgroundColor)
Rotate image around the center.
|
void |
setFormatSpecificPalette(com.aspose.cad.IColorPalette newPalette)
Sets palette into format-specific places
|
crop, dither, filter, getArgb32Pixel, getBitsPerPixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getHorizontalResolution, getPixel, getRawCustomColorConverter, getRawDataFormat, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getTransparentColor, getVerticalResolution, getXmpData, hasAlpha, hasTransparentColor, isRawDataAvailable, loadArgb32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, readScanLine, readScanLineArgb, saveArgb32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setHorizontalResolution, setPalette, setPixel, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setTransparentColor, setTransparentColor, setVerticalResolution, setXmpData, writeScanLine, writeScanLine
canLoad, canLoad, canLoad, canLoad, canSave, getBackgroundColor, getBounds, getContainer, getFileFormat, getFileFormat, getHeight, getPalette, getSize, getStrings, getUnitlessDefaultUnitType, getUnitType, getWidth, hasBackgroundColor, load, load, load, load, save, save, save, setBackgroundColor, setBackgroundColor, setPalette
public final boolean isCached()
Gets a value indicating whether image data is cached currently.
isCached
in class com.aspose.cad.DataStreamSupporter
true
if image data is cached; otherwise, false
.public final void cacheData()
Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer
.
cacheData
in class com.aspose.cad.DataStreamSupporter
public final void resize(int newWidth, int newHeight, int resizeType)
Resizes the image.
resize
in class RasterImage
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.public final void resize(int newWidth, int newHeight, ImageResizeSettings settings)
Resizes the image.
resize
in class RasterImage
newWidth
- The new width.newHeight
- The new height.settings
- The resize settings.public void rotate(float angle, boolean resizeProportionally, com.aspose.cad.Color backgroundColor)
Rotate image around the center.
rotate
in class RasterImage
angle
- The rotate angle in degrees. Positive values will rotate clockwise.resizeProportionally
- if set to true
you will have your image size changed according to rotated rectangle (corner points) projections in other case that leaves dimensions untouched and only internal image contents are rotated.backgroundColor
- Color of the background.public void crop(com.aspose.cad.Rectangle rectangle)
Cropping the image.
crop
in class RasterImage
rectangle
- The rectangle.public void dither(int ditheringMethod, int bitsCount, com.aspose.cad.IColorPalette customPalette)
Performs dithering on the current image.
dither
in class RasterImage
ditheringMethod
- The dithering method.bitsCount
- The final bits count for dithering.customPalette
- The custom palette for dithering.public void grayscale()
Transformation of an image to its grayscale representation
grayscale
in class RasterImage
public void binarizeFixed(byte threshold)
Binarization of an image with predefined threshold
binarizeFixed
in class RasterImage
threshold
- Threshold value. If corresponding gray value of a pixel is greater than threshold, a value of 255 will be assigned to it, 0 otherwise.public void binarizeOtsu()
Binarization of an image with Otsu thresholding
binarizeOtsu
in class RasterImage
public void binarizeBradley(double brightnessDifference)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
binarizeBradley
in class RasterImage
brightnessDifference
- The brightness difference between pixel and the average of an s x s window of pixels centered around this pixel.public void adjustBrightness(int brightness)
Adjust of a brightness for image.
adjustBrightness
in class RasterImage
brightness
- Brightness value.public void adjustContrast(float contrast)
Image contrasting
adjustContrast
in class RasterImage
contrast
- Contrast value (in range [-100; 100])public void adjustGamma(float gammaRed, float gammaGreen, float gammaBlue)
Gamma-correction of an image.
adjustGamma
in class RasterImage
gammaRed
- Gamma for red channel coefficientgammaGreen
- Gamma for green channel coefficientgammaBlue
- Gamma for blue channel coefficientpublic void adjustGamma(float gamma)
Gamma-correction of an image.
adjustGamma
in class RasterImage
gamma
- Gamma for red, green and blue channels coefficientpublic com.aspose.cad.IColorPalette getFormatSpecificPalette()
Gets palette from format-specific places
IColorPalette
.public void setFormatSpecificPalette(com.aspose.cad.IColorPalette newPalette)
Sets palette into format-specific places
newPalette
- New 32-bit ARGB palette.