GifImage
GifImage class
Represents one image in GIF (Graphics Interchange Format) format with its metadata and additional methods
public sealed class GifImage : RasterImageResourceBase
Constructors
| Name |
Description |
| GifImage(string, Stream) |
Creates new GifImage instance from content, represented as byte stream, and with specified name |
| GifImage(string, string) |
Creates new GifImage instance from content, represented as base64-encoded string, and with specified name |
Properties
| Name |
Description |
| AspectRatio { get; } |
Returns an aspect ratio of this image as the width-to-height relation |
| ByteContent { get; } |
Returns content of this raster image as byte stream |
| FilenameWithExtension { get; } |
Returns correct filename of this raster image, which consists of name and extension. Theoretically can differ from the name. |
| IsDisposed { get; } |
Determines whether this raster image is disposed or not |
| Length { get; } |
Returns the length of this raster image file in bytes |
| LinearDimensions { get; } |
Returns linear dimensions of this raster image (width and height) |
| Name { get; } |
Returns name of this raster image. Usually doesn’t contain filename extension and theoretically can differ from filename. |
| TextContent { get; } |
Returns content of this raster image as base64-encoded string |
| override Type { get; } |
Returns ImageType.Gif |
| Version { get; } |
Returns internal version of this GIF image (version is extracted from header) |
Methods
| Name |
Description |
| Dispose() |
Disposes this raster image, disposing its content and making most methods and properties non-working |
| Equals(IHtmlResource) |
Checks this instance with specified on reference equality. |
| Save(string) |
Saves this raster image to the specified file |
| static IsValid(Stream) |
Checks whether specified stream is a valid GIF image |
| static IsValid(string) |
Checks whether specified base64-encoded string is a valid GIF image |
Events
| Name |
Description |
| event Disposed |
Event, which occurs when this raster image is disposed |
See Also