Class ImageTool
Tool to detect image formats and convert from binary data to base64 strings.
Inheritance
System.Object
ImageTool
Namespace: DSharpPlus
Assembly: cs.temp.dll.dll
Syntax
public sealed class ImageTool : IDisposable
Constructors
ImageTool(Stream)
Creates a new image tool from given stream.
Declaration
public ImageTool(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Stream to work with. |
Properties
SourceStream
Gets the stream this tool is operating on.
Declaration
public Stream SourceStream { get; }
Property Value
Type | Description |
---|---|
Stream |
Methods
Dispose()
Disposes this image tool.
Declaration
public void Dispose()
GetBase64()
Converts this image into base64 data format string.
Declaration
public string GetBase64()
Returns
Type | Description |
---|---|
System.String | Data-scheme base64 string. |
GetFormat()
Detects the format of this image.
Declaration
public ImageFormat GetFormat()
Returns
Type | Description |
---|---|
ImageFormat | Detected format. |