RasterImageResourceBase
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.htmlcss.resources.images.IImageResource
public abstract class RasterImageResourceBase implements IImageResource
Base class for any supported raster image with fixed name, dimensions, aspect ratio, type, size, and content.
| Constructor | Description |
|---|---|
| RasterImageResourceBase() |
| Field | Description |
|---|---|
| Disposed |
| Method | Description |
|---|---|
| getName() | Returns name of this raster image. |
| getFilenameWithExtension() | Returns correct filename of this raster image, which consists of name and extension. |
| getLinearDimensions() | Returns linear dimensions of this raster image (width and height) |
| getAspectRatio() | Returns an aspect ratio of this image as the width-to-height relation |
| getLength() | Returns the length of this raster image file in bytes |
| getByteContent() | Returns content of this raster image as byte stream |
| getTextContent() | Returns content of this raster image as base64-encoded string |
| save(String fullPathToFile) | Saves this raster image to the specified file |
| equals(IHtmlResource other) | Checks this instance with specified on reference equality. |
| dispose() | Disposes this raster image, disposing its content and making most methods and properties non-working |
| isDisposed() | Determines whether this raster image is disposed or not |
| getType() | In implementing type should return information about type of the raster image |
public RasterImageResourceBase()
public final Event<EventHandler> Disposed
public final String getName()
Returns name of this raster image. Usually doesn’t contain filename extension and theoretically can differ from filename.
Returns: java.lang.String
public final String getFilenameWithExtension()
Returns correct filename of this raster image, which consists of name and extension. Theoretically can differ from the name.
Returns: java.lang.String
public final Dimensions getLinearDimensions()
Returns linear dimensions of this raster image (width and height)
Returns: Dimensions
public final Ratio getAspectRatio()
Returns an aspect ratio of this image as the width-to-height relation
Returns: Ratio
public final int getLength()
Returns the length of this raster image file in bytes
Returns: int -
public final InputStream getByteContent()
Returns content of this raster image as byte stream
Returns: java.io.InputStream -
public final String getTextContent()
Returns content of this raster image as base64-encoded string
Returns: java.lang.String -
public final void save(String fullPathToFile)
Saves this raster image to the specified file
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fullPathToFile | java.lang.String | Full path to the file, which will be created or rewritten |
public final boolean equals(IHtmlResource other)
Checks this instance with specified on reference equality.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | IHtmlResource | Other IHtmlResource inheritor |
Returns: boolean - True if are equal, false if are unequal
public final void dispose()
Disposes this raster image, disposing its content and making most methods and properties non-working
public final boolean isDisposed()
Determines whether this raster image is disposed or not
Returns: boolean -
public abstract ImageType getType()
In implementing type should return information about type of the raster image
Returns: ImageType -
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.