Search Results for

    Show / Hide Table of Contents

    Class StreamHelper

    Helper class for working with streams and detecting image types.

    Inheritance
    System.Object
    StreamHelper
    Namespace: IronWord.Models.Extensions
    Assembly: IronWord.dll
    Syntax
    public static class StreamHelper : Object

    Methods

    GetImageType(FileStream)

    Determines the image type based on the content of the file stream.

    Declaration
    public static ImageType GetImageType(this FileStream stream)
    Parameters
    Type Name Description
    System.IO.FileStream stream

    The input file stream to analyze.

    Returns
    Type Description
    ImageType

    The detected image type.

    GetImageType(MemoryStream)

    Determines the image type based on the content of the stream.

    Declaration
    public static ImageType GetImageType(this MemoryStream stream)
    Parameters
    Type Name Description
    System.IO.MemoryStream stream

    The input stream to analyze.

    Returns
    Type Description
    ImageType

    The detected image type.

    GetImageType(Stream)

    Determines the image type based on the content of the stream.

    Declaration
    public static ImageType GetImageType(this Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    The input stream to analyze.

    Returns
    Type Description
    ImageType

    The detected image type.

    ToBase64(FileStream)

    Converts the content of the file stream to a base64-encoded string.

    Declaration
    public static string ToBase64(this FileStream stream)
    Parameters
    Type Name Description
    System.IO.FileStream stream

    The input file stream to convert.

    Returns
    Type Description
    System.String

    A base64-encoded string representing the file stream content.

    ToBase64(Stream)

    Converts the content of the stream to a base64-encoded string.

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

    The input stream to convert.

    Returns
    Type Description
    System.String

    A base64-encoded string representing the stream content.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronWord to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWord free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.