public abstract class RasterCachedMultipageImage extends RasterCachedImage implements IMultipageImage
The raster multipage image
<autogeneratedoc></autogeneratedoc>
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 |
binarizeBradley(double brightnessDifference,
int windowSize)
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 private.
|
void |
crop(int leftShift,
int rightShift,
int topShift,
int bottomShift)
Crop image with shifts.
|
void |
crop(Rectangle rectangle)
Cropping the image.
|
void |
dither(int ditheringMethod,
int bitsCount,
IColorPalette customPalette)
Performs dithering on the current image.
|
void |
filter(Rectangle rectangle,
FilterOptionsBase options)
Filters the specified rectangle.
|
Color |
getBackgroundColor()
Gets a value for the background color.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
abstract Image |
getDefaultPage()
Gets the default page.
|
int |
getHeight()
Gets the image height.
|
float |
getImageOpacity()
Gets opacity of this image.
|
abstract int |
getPageCount()
Gets the page count.
|
PageExportingAction |
getPageExportingAction()
Gets the page exporting action.
|
abstract Image[] |
getPages()
Gets the pages.
|
int |
getWidth()
Gets the image width.
|
XmpPacketWrapper |
getXmpData()
Gets XMP data from frame.
|
void |
grayscale()
Transformation of an image to its grayscale representation
|
boolean |
hasAlpha()
Gets a value indicating whether this instance has alpha.
|
boolean |
hasTransparentColor()
Gets a value indicating whether image has transparent color.
|
boolean |
isCached()
Gets a value indicating whether image data is cached currently.
|
void |
normalizeAngle(boolean resizeProportionally,
Color backgroundColor)
Normalizes the angle.
|
void |
replaceColor(int oldColorArgb,
byte oldColorDiff,
int newColorArgb)
Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.
|
void |
replaceNonTransparentColors(int newColorArgb)
Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges.
|
void |
resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
|
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
|
void |
resizeHeightProportionally(int newHeight,
int resizeType)
Resizes the width proportionally.
|
void |
resizeWidthProportionally(int newWidth,
int resizeType)
Resizes the width proportionally.
|
void |
rotate(float angle,
boolean resizeProportionally,
Color backgroundColor)
RasterCahcedMultipageImage.Rotate image around the center. |
void |
rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the Active frame only.
|
void |
rotateFlipAll(int rotateFlip)
Rotates the flip all.
|
void |
setBackgroundColor(Color value)
Sets a value for the background color.
|
void |
setPageExportingAction(PageExportingAction value)
Sets the page exporting action.
|
void |
setXmpData(XmpPacketWrapper value)
Sets XMP data from frame.
|
dither, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getHorizontalResolution, getModifyDate, getPixel, getPremultiplyComponents, getRawCustomColorConverter, getRawDataFormat, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getSkewAngle, getTransparentColor, getUpdateXmpData, getUseRawData, getVerticalResolution, isRawDataAvailable, loadArgb32Pixels, loadArgb64Pixels, loadCmyk32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, loadRawData, normalizeAngle, readArgb32ScanLine, readScanLine, replaceColor, replaceNonTransparentColors, rotate, saveArgb32Pixels, saveCmyk32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setHorizontalResolution, setPalette, setPixel, setPremultiplyComponents, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setTransparentColor, setTransparentColor, setUpdateXmpData, setUseRawData, setVerticalResolution, toBitmap, writeArgb32ScanLine, writeScanLine
canLoad, canLoad, canLoad, canLoad, canSave, create, getBounds, getBufferSizeHint, getContainer, getDefaultOptions, getFileFormat, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProgressEventHandler, getProgressEventHandlerInfo, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBufferSizeHint, setInterruptMonitor, setPalette
getDataStreamContainer, save, save, save, save
close, dispose, getDisposed
public int getHeight()
Gets the image height.
Value: The image height.getHeight
in interface IObjectWithBounds
getHeight
in class Image
public int getWidth()
Gets the image width.
Value: The image width.getWidth
in interface IObjectWithBounds
getWidth
in class Image
public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.<autogeneratedoc></autogeneratedoc>
getBitsPerPixel
in class Image
public final boolean isCached()
Gets a value indicating whether image data is cached currently.
Value:true
if image data is cached; otherwise, false
.isCached
in class RasterCachedImage
public abstract int getPageCount()
Gets the page count.
Value: The page count.<autogeneratedoc></autogeneratedoc>
getPageCount
in interface IMultipageImage
public abstract Image[] getPages()
Gets the pages.
Value: The pages.<autogeneratedoc></autogeneratedoc>
getPages
in interface IMultipageImage
public abstract Image getDefaultPage()
Gets the default page.
Value: The default page.<autogeneratedoc></autogeneratedoc>
getDefaultPage
in interface IMultipageImage
public boolean hasAlpha()
Gets a value indicating whether this instance has alpha.
Value:true
if this instance has alpha; otherwise, false
.hasAlpha
in class RasterImage
public boolean hasTransparentColor()
Gets a value indicating whether image has transparent color.
hasTransparentColor
in class RasterImage
public float getImageOpacity()
Gets opacity of this image.
Value: The opacity value between 0.0 (fully transparent) and 1.0 (fully opaque).<autogeneratedoc></autogeneratedoc>
getImageOpacity
in class RasterImage
public Color getBackgroundColor()
Gets a value for the background color.
getBackgroundColor
in class Image
public void setBackgroundColor(Color value)
Sets a value for the background color.
setBackgroundColor
in class Image
value
- a value for the background color.public XmpPacketWrapper getXmpData()
Gets XMP data from frame.
Value: XMP packet data wrappergetXmpData
in class RasterImage
public void setXmpData(XmpPacketWrapper value)
Sets XMP data from frame.
Value: XMP packet data wrappersetXmpData
in class RasterImage
value
- XMP data from frame.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
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
value
- the page exporting action.public void adjustBrightness(int brightness)
Adjust of a brightness
for image.
adjustBrightness
in class RasterCachedImage
brightness
- Brightness value.public void adjustContrast(float contrast)
Image
contrasting
adjustContrast
in class RasterCachedImage
contrast
- Contrast value (in range [-100; 100])public void adjustGamma(float gammaRed, float gammaGreen, float gammaBlue)
Gamma-correction of an image.
adjustGamma
in class RasterCachedImage
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 RasterCachedImage
gamma
- Gamma for red, green and blue channels coefficientpublic void binarizeFixed(byte threshold)
Binarization of an image with predefined threshold
binarizeFixed
in class RasterCachedImage
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 binarizeBradley(double brightnessDifference, int windowSize)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
binarizeBradley
in class RasterCachedImage
brightnessDifference
- The brightness difference between pixel and the average of an s x s window of pixels
centered around this pixel.windowSize
- The size of s x s window of pixels centered around this pixelpublic void binarizeBradley(double brightnessDifference)
Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding
binarizeBradley
in class RasterCachedImage
brightnessDifference
- The brightness difference between pixel and the average of an s x s window of pixels
centered around this pixel.public void binarizeOtsu()
Binarization of an image with Otsu thresholding
binarizeOtsu
in class RasterCachedImage
public void crop(Rectangle rectangle)
Cropping the image.
crop
in class RasterCachedImage
rectangle
- The rectangle.public void crop(int leftShift, int rightShift, int topShift, int bottomShift)
Crop image with shifts.
crop
in class RasterImage
leftShift
- The left shift.rightShift
- The right shift.topShift
- The top shift.bottomShift
- The bottom shift.com.aspose.ms.System.ArgumentException
- Rectangle incorrect. - rectangle
or
Rectangle must be contained in the image bounds. - rectangleImageException
- Can't crop image. Frame index: " + frameIndex
or
Can't crop image.public void dither(int ditheringMethod, int bitsCount, IColorPalette customPalette)
Performs dithering on the current image.
dither
in class RasterCachedImage
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 RasterCachedImage
public void rotate(float angle, boolean resizeProportionally, Color backgroundColor)
RasterCahcedMultipageImage.Rotate
image around the center.
rotate
in class RasterCachedImage
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
image contents are rotated.backgroundColor
- Color of the background.public void rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the Active frame only.
rotateFlip
in class RasterCachedImage
rotateFlipType
- The rotate flip type.RotateFlipType
public void rotateFlipAll(int rotateFlip)
Rotates the flip all.
rotateFlip
- The rotate flip.
<autogeneratedoc></autogeneratedoc>
public void resize(int newWidth, int newHeight, int resizeType)
Resizes the image.
resize
in class RasterCachedImage
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.public void resize(int newWidth, int newHeight, ImageResizeSettings settings)
Resizes the image.
resize
in class RasterCachedImage
newWidth
- The new width.newHeight
- The new height.settings
- The resize settings.public void resizeWidthProportionally(int newWidth, int resizeType)
Resizes the width proportionally.
resizeWidthProportionally
in class Image
newWidth
- The new width.resizeType
- Type of the resize.public void resizeHeightProportionally(int newHeight, int resizeType)
Resizes the width proportionally.
resizeHeightProportionally
in class Image
newHeight
- The new height.resizeType
- Type of the resize.public void replaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)
Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.
replaceColor
in class RasterImage
oldColorArgb
- Old color ARGB value to be replaced.oldColorDiff
- Allowed difference in old color to be able to widen replaced color tone.newColorArgb
- New color ARGB value to replace old color with.public void replaceNonTransparentColors(int newColorArgb)
Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges. Note: if you use it on images without transparency, all colors will be replaced with a single one.
replaceNonTransparentColors
in class RasterImage
newColorArgb
- New color ARGB value to replace non transparent colors with.public void filter(Rectangle rectangle, FilterOptionsBase options)
Filters the specified rectangle.
filter
in class RasterImage
rectangle
- The rectangle.options
- The options.public void normalizeAngle(boolean resizeProportionally, Color backgroundColor)
Normalizes the angle.
This method is applicable to scanned text documents to get rid of the skewed scan.
This method uses RasterImage.getSkewAngle()
and RasterImage.rotate(float, boolean, Color)
methods.
normalizeAngle
in class RasterImage
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 cacheData()
Caches the data private.
cacheData
in class RasterCachedImage