Search Results for

    Show / Hide Table of Contents

    Class ImageTool

    Tool to detect image formats and convert from binary data to base64 strings.

    Inheritance
    System.Object
    ImageTool
    Namespace: DisCatSharp
    Assembly: DisCatSharp.dll
    Syntax
    public sealed class ImageTool : IDisposable

    Constructors

    | Improve this Doc View Source

    ImageTool(Stream)

    Creates a new image tool from given stream.

    Declaration
    public ImageTool(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream to work with.

    Properties

    | Improve this Doc View Source

    SourceStream

    Gets the stream this tool is operating on.

    Declaration
    public Stream SourceStream { get; }
    Property Value
    Type Description
    System.IO.Stream

    Methods

    | Improve this Doc View Source

    Base64FromStream(Optional<Stream>)

    Utility function to convert an optional image stream into an optional base 64 string.

    Declaration
    public static Optional<string> Base64FromStream(Optional<Stream> stream)
    Parameters
    Type Name Description
    Optional<System.IO.Stream> stream

    The optional stream.

    Returns
    Type Description
    Optional<System.String>

    The optional base 64 string.

    | Improve this Doc View Source

    Base64FromStream(Stream)

    Utility function to convert an image stream into a base 64 string.

    Declaration
    public static string Base64FromStream(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The stream.

    Returns
    Type Description
    System.String

    The base 64 string.

    | Improve this Doc View Source

    Dispose()

    Disposes this image tool.

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    GetBase64()

    Converts this image into base64 data format string.

    Declaration
    public string GetBase64()
    Returns
    Type Description
    System.String

    Data-scheme base64 string.

    | Improve this Doc View Source

    GetFormat()

    Detects the format of this image.

    Declaration
    public ImageFormat GetFormat()
    Returns
    Type Description
    ImageFormat

    Detected format.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems