Search Results for

    Show / Hide Table of Contents

    Class ImageRuntime

    Image Runtime.

    Inheritance
    object
    ImageRuntime
    Namespace: Evergine.Framework.Runtimes
    Assembly: Evergine.Runtimes.Image.dll
    Syntax
    public class ImageRuntime

    Constructors

    ImageRuntime(GraphicsContext, AssetsDirectory)

    Initializes a new instance of the ImageRuntime class.

    Declaration
    public ImageRuntime(GraphicsContext graphicsContext, AssetsDirectory assetsDirectory)
    Parameters
    Type Name Description
    GraphicsContext graphicsContext

    Graphics context instance.

    AssetsDirectory assetsDirectory

    Assets Directory instance.

    Fields

    Instance

    Gets the a default instance of the class resolving the required services using the default Evergine container.

    Declaration
    public static readonly ImageRuntime Instance
    Field Value
    Type Description
    ImageRuntime

    Methods

    Read(Stream, bool, bool)

    Reads an image format file from the stream and returns a texture asset.

    Declaration
    public Task<Texture> Read(Stream stream, bool generateMipmap = true, bool premulAlpha = true)
    Parameters
    Type Name Description
    Stream stream

    Seeked stream.

    bool generateMipmap

    Generate texture with mipmap or not. (Default: true).

    bool premulAlpha

    Generate with premultiple alpha or not. (Default: true).

    Returns
    Type Description
    Task<Texture>

    Texture asset.

    Read(string, bool, bool)

    Reads an image from the file path.

    Declaration
    public Task<Texture> Read(string filePath, bool generateMipmap = true, bool premulAlpha = true)
    Parameters
    Type Name Description
    string filePath

    The file path.

    bool generateMipmap

    Generate texture with mipmap or not. (Default: true).

    bool premulAlpha

    Generate with premultiple alpha or not. (Default: true).

    Returns
    Type Description
    Task<Texture>

    The model.

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX