Packages

 

com.aspose.imaging.fileformats.cmx

Class CmxImage

    • Constructor Detail

      • CmxImage

        public CmxImage(StreamContainer streamContainer,
                        LoadOptions loadOptions)

        Initializes a new instance of the CmxImage class.

        Parameters:
        streamContainer - The stream container.
        loadOptions - The load options.
    • Method Detail

      • getFileFormat

        public long getFileFormat()

        Gets a value of file format

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

        public int getBitsPerPixel()

        Gets the image bits per pixel count.

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

        public boolean isCached()

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

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

        public final CmxDocument getDocument()

        Gets the CMX document.

        Returns:
        the CMX document.
      • getCmxPage

        public final CmxPage getCmxPage()

        Gets the CMX page.

        Specified by:
        getCmxPage in interface ICmxImage
        Returns:
        the CMX page.
      • getPages

        public final CmxImagePage[] getPages()

        Gets the pages.

        Returns:
        the pages.
      • 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.
      • 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.
      • 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.
      • 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.