Packages

 

com.aspose.psd

Interfaces

Classes

Exceptions

com.aspose.psd

Class RasterCachedImage

    • Method Detail

      • getRotateMode

        public static int getRotateMode()

        Gets or sets the rotate mode.

        Returns:
        The rotate mode.
      • isCached

        public boolean isCached()

        Gets a value indicating whether image data is cached currently.

        Specified by:
        isCached in class DataStreamSupporter
        Returns:
        true if image data is cached; otherwise, false.
      • cacheData

        public void cacheData()

        Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer.

        Specified by:
        cacheData in class DataStreamSupporter
      • resize

        public void resize(int newWidth,
                           int newHeight,
                           int resizeType)

        Resizes the image.

        Overrides:
        resize in class RasterImage
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        resizeType - The resize type.
      • resize

        public void resize(int newWidth,
                           int newHeight,
                           ImageResizeSettings settings)

        Resizes the image.

        Overrides:
        resize in class RasterImage
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        settings - The resize settings.
      • rotateFlip

        public void rotateFlip(int rotateFlipType)
        Description copied from class: Image

        Rotates, flips, or rotates and flips the image.

        Specified by:
        rotateFlip in class Image
        Parameters:
        rotateFlipType - Type of the rotate flip.
      • rotate

        public void rotate(float angle,
                           boolean resizeProportionally,
                           Color backgroundColor)

        Rotate image around the center.

        Overrides:
        rotate in class RasterImage
        Parameters:
        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.
      • doRotate

        public void doRotate(float angle,
                             boolean resizeProportionally,
                             Color backgroundColor)
      • crop

        public void crop(Rectangle rectangle)

        Cropping the image.

        Overrides:
        crop in class RasterImage
        Parameters:
        rectangle - The rectangle.
      • dither

        public void dither(int ditheringMethod,
                           int bitsCount,
                           IColorPalette customPalette)

        Performs dithering on the current image.

        Specified by:
        dither in class RasterImage
        Parameters:
        ditheringMethod - The dithering method.
        bitsCount - The final bits count for dithering.
        customPalette - The custom palette for dithering.
      • grayscale

        public void grayscale()

        Transformation of an image to its grayscale representation

        Overrides:
        grayscale in class RasterImage
      • binarizeFixed

        public void binarizeFixed(byte threshold)

        Binarization of an image with predefined threshold

        Overrides:
        binarizeFixed in class RasterImage
        Parameters:
        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.
      • binarizeOtsu

        public void binarizeOtsu()

        Binarization of an image with Otsu thresholding

        Overrides:
        binarizeOtsu in class RasterImage
      • binarizeBradley

        public void binarizeBradley(double brightnessDifference,
                                    int windowSize)

        Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding

        Overrides:
        binarizeBradley in class RasterImage
        Parameters:
        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 pixel
      • binarizeBradley

        public void binarizeBradley(double brightnessDifference)

        Binarization of an image using Bradley's adaptive thresholding algorithm using the integral image thresholding

        Overrides:
        binarizeBradley in class RasterImage
        Parameters:
        brightnessDifference - The brightness difference between pixel and the average of an s x s window of pixels centered around this pixel.
      • adjustBrightness

        public void adjustBrightness(int brightness)

        Adjust of a brightness for image.

        Overrides:
        adjustBrightness in class RasterImage
        Parameters:
        brightness - Brightness value.
      • adjustContrast

        public void adjustContrast(float contrast)

        Image contrasting

        Overrides:
        adjustContrast in class RasterImage
        Parameters:
        contrast - Contrast value (in range [-100; 100])
      • adjustGamma

        public void adjustGamma(float gammaRed,
                                float gammaGreen,
                                float gammaBlue)

        Gamma-correction of an image.

        Overrides:
        adjustGamma in class RasterImage
        Parameters:
        gammaRed - Gamma for red channel coefficient
        gammaGreen - Gamma for green channel coefficient
        gammaBlue - Gamma for blue channel coefficient
      • adjustGamma

        public void adjustGamma(float gamma)

        Gamma-correction of an image.

        Overrides:
        adjustGamma in class RasterImage
        Parameters:
        gamma - Gamma for red, green and blue channels coefficient