Class RasterImageResourceBase

  • java.lang.Object
    • com.groupdocs.editor.htmlcss.resources.images.raster.RasterImageResourceBase
    • Constructor Detail

      • RasterImageResourceBase

        public RasterImageResourceBase()
    • Method Detail

      • dispose

        public final void dispose()

        Disposes this raster image, disposing its content and making most methods and properties non-working

        Specified by:
        dispose in interface IDisposable
      • equals

        public final boolean equals(IHtmlResource other)

        Checks this instance with specified on reference equality.

        other - Other IHtmlResource inheritor
        True if are equal, false if are unequal
      • generateBitmap

        public final BufferedImage generateBitmap()

        Generates and returns a new instance of the 'System.Drawing.Bitmap' from this raster image.

        New instance of 'System.Drawing.Bitmap'

        'System.Drawing.Bitmap' is not cached and thus will be generated every time this method will be called
      • getAspectRatio

        public final Ratio getAspectRatio()

        Returns an aspect ratio of this image as the width-to-height relation

        Specified by:
        getAspectRatio in interface IImageResource
      • getFilenameWithExtension

        public final String getFilenameWithExtension()

        Returns correct filename of this raster image, which consists of name and extension. Theoretically can differ from the name.

        Specified by:
        getFilenameWithExtension in interface IHtmlResource
      • getLength

        public final int getLength()

        Returns the length of this raster image file in bytes

      • getName

        public final String getName()

        Returns name of this raster image. Usually doesn't contain filename extension and theoretically can differ from filename.

        Specified by:
        getName in interface IHtmlResource
      • getTextContent

        public final String getTextContent()

        Returns content of this raster image as base64-encoded string

        Specified by:
        getTextContent in interface IHtmlResource
      • isDisposed

        public final boolean isDisposed()

        Determines whether this raster image is disposed or not

        Specified by:
        isDisposed in interface IAuxDisposable
      • reduceToNewHeight

        public RasterImageResourceBase reduceToNewHeight(int targetHeightInPixels)

        Creates and returns a new reduced image resource of the same type, but with specified new reduced height and proportionally reduced width.

        targetHeightInPixels - Height of the desired image in pixels. Should be strictly lesser than original height.
        New instance with specified height, that is inheritor of RasterImageResourceBase
      • save

        public final void save(String fullPathToFile)

        Saves this raster image to the specified file

        Specified by:
        save in interface IHtmlResource
        fullPathToFile - Full path to the file, which will be created or rewritten