Packages

 

com.aspose.cad

Class RasterCachedImage

    • Method Detail

      • isCached

        public final boolean isCached()

        Gets a value indicating whether image data is cached currently.

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

        public final void cacheData()

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

        Specified by:
        cacheData in class com.aspose.cad.DataStreamSupporter
      • resize

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

        Resizes the image.

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

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

        Resizes the image.

        Specified by:
        resize in class RasterImage
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        settings - The resize settings.
      • rotate

        public void rotate(float angle,
                           boolean resizeProportionally,
                           com.aspose.cad.Color backgroundColor)

        Rotate image around the center.

        Specified by:
        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.
      • crop

        public void crop(com.aspose.cad.Rectangle rectangle)

        Cropping the image.

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

        public void dither(int ditheringMethod,
                           int bitsCount,
                           com.aspose.cad.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

        Specified by:
        grayscale in class RasterImage
      • binarizeFixed

        public void binarizeFixed(byte threshold)

        Binarization of an image with predefined threshold

        Specified by:
        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

        Specified by:
        binarizeOtsu in class RasterImage
      • binarizeBradley

        public void binarizeBradley(double brightnessDifference)

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

        Specified by:
        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.

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

        public void adjustContrast(float contrast)

        Image contrasting

        Specified by:
        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.

        Specified by:
        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.

        Specified by:
        adjustGamma in class RasterImage
        Parameters:
        gamma - Gamma for red, green and blue channels coefficient
      • getFormatSpecificPalette

        public com.aspose.cad.IColorPalette getFormatSpecificPalette()

        Gets palette from format-specific places

        Returns:
        Format-specific IColorPalette.
      • setFormatSpecificPalette

        public void setFormatSpecificPalette(com.aspose.cad.IColorPalette newPalette)

        Sets palette into format-specific places

        Parameters:
        newPalette - New 32-bit ARGB palette.