Packages

 

com.aspose.imaging.fileformats.cdr

Class CdrImage

    • Constructor Detail

      • CdrImage

        public CdrImage(InputStream stream,
                        LoadOptions loadOptions)

        Initializes a new instance of the CdrImage class.

        Parameters:
        stream - The stream.
        loadOptions - The load options.
        Throws:
        com.aspose.ms.System.IndexOutOfRangeException - This document not be contained pages
      • CdrImage

        public CdrImage(com.aspose.ms.System.IO.Stream stream,
                        LoadOptions loadOptions)
    • Method Detail

      • isCached

        public boolean isCached()

        Gets a value indicating whether object's data is cached currently and no data readig is required.

        Specified by:
        isCached in class DataStreamSupporter
        Returns:
        true if object's data is cached; otherwise, false.
      • getBitsPerPixel

        public int getBitsPerPixel()

        Gets the image bits per pixel count.

        Specified by:
        getBitsPerPixel in class Image
        Returns:
        the image bits per pixel count.
      • getPageCount

        public final int getPageCount()

        Gets the page count.

        Returns:
        the page count.
      • setPageCount

        public final void setPageCount(int value)

        Sets the page count.

        Parameters:
        value - the page count.
      • getPages

        public final CdrImagePage[] getPages()

        Gets the pages.

        Returns:
        the pages.
      • getFileFormat

        public long getFileFormat()

        Gets a value of file format

        Overrides:
        getFileFormat in class Image
        Returns:
        a value of file format
      • resize

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

        Resizes the image.

        Specified by:
        resize in class Image
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        resizeType - The resize type.
        Throws:
        com.aspose.ms.System.NotImplementedException - method is not supported
      • resize

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

        Resizes the image.

        Specified by:
        resize in class Image
        Parameters:
        newWidth - The new width.
        newHeight - The new height.
        settings - The resize settings.
        Throws:
        com.aspose.ms.System.NotImplementedException - method is not supported
      • rotateFlip

        public void rotateFlip(int rotateFlipType)

        Rotates, flips, or rotates and flips the image.

        Specified by:
        rotateFlip in class Image
        Parameters:
        rotateFlipType - Type of the rotate flip.
        Throws:
        com.aspose.ms.System.NotImplementedException - method is not supported
      • setPalette

        public void setPalette(IColorPalette palette,
                               boolean updateColors)

        Sets the image palette.

        Specified by:
        setPalette in class Image
        Parameters:
        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.
        Throws:
        com.aspose.ms.System.NotImplementedException - method is not supported