com.groupdocs.editor.htmlcss.resources.images.raster

Class RasterImageResourceBase

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

      • RasterImageResourceBase

        public RasterImageResourceBase()
    • Method Detail

      • dispose

        public void dispose()

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

        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable
      • equals

        public boolean equals(IHtmlResource other)

        Checks this instance with specified on reference equality.

        Parameters:
        other -
        Returns:
      • generateBitmap

        public BufferedImage generateBitmap()

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

        Returns:


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

      • getAspectRatio

        public Ratio getAspectRatio()

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

        Specified by:
        getAspectRatio in interface IImageResource
      • getFilenameWithExtension

        public 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 int getLength()

        Returns the length of this raster image file in bytes

      • getName

        public 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 String getTextContent()

        Returns content of this raster image as base64-encoded string

        Specified by:
        getTextContent in interface IHtmlResource
      • isDisposed

        public 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.

        Parameters:
        targetHeightInPixels - Height of the desired image in pixels. Should be strictly lesser than original height.
        Returns:
      • save

        public void save(String fullPathToFile)

        Saves this raster image to the specified file

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