Search Results for

    Show / Hide Table of Contents

    Class ImageHelpers

    This static class represents the image helpers.

    Inheritance
    object
    ImageHelpers
    Namespace: Evergine.Common.Helpers
    Assembly: Evergine.Common.dll
    Syntax
    public static class ImageHelpers

    Methods

    FromBGR24ToRGBA32(byte[], int, int)

    Converts BGR to RGBA.

    Declaration
    public static byte[] FromBGR24ToRGBA32(byte[] bytes, int width, int height)
    Parameters
    Type Name Description
    byte[] bytes

    The BGR bytes.

    int width

    The image width.

    int height

    The image height.

    Returns
    Type Description
    byte[]

    The RGBA bytes.

    FromBGRA32ToRGBA32(ref byte[])

    Converts BGRA to RGBA.

    Declaration
    public static byte[] FromBGRA32ToRGBA32(ref byte[] bytes)
    Parameters
    Type Name Description
    byte[] bytes

    The BGRA bytes.

    Returns
    Type Description
    byte[]

    The RGBA bytes.

    FromRGB24ToRGBA32(byte[], int, int)

    Converts RGB to RGBA.

    Declaration
    public static byte[] FromRGB24ToRGBA32(byte[] bytes, int width, int height)
    Parameters
    Type Name Description
    byte[] bytes

    The RGB bytes.

    int width

    The image width.

    int height

    The image height.

    Returns
    Type Description
    byte[]

    The RGBA bytes.

    ReadLittleEndianInt16(BinaryReader)

    Reads an Int16 from the binary reader.

    Declaration
    public static short ReadLittleEndianInt16(BinaryReader binaryReader)
    Parameters
    Type Name Description
    BinaryReader binaryReader

    Binary reader.

    Returns
    Type Description
    short

    Int16 data.

    ReadLittleEndianInt32(BinaryReader)

    Reads an Int32 from the binary reader.

    Declaration
    public static int ReadLittleEndianInt32(BinaryReader binaryReader)
    Parameters
    Type Name Description
    BinaryReader binaryReader

    The binary reader.

    Returns
    Type Description
    int

    Int32 data.

    ReadLittleEndianUInt16(BinaryReader)

    Reads a UInt16 from a binary reader.

    Declaration
    public static ushort ReadLittleEndianUInt16(BinaryReader binaryReader)
    Parameters
    Type Name Description
    BinaryReader binaryReader

    The binary reader.

    Returns
    Type Description
    ushort

    The UInt16 data.

    ReadTextureDescription(BinaryReader)

    Read texture description.

    Declaration
    public static TextureDescription ReadTextureDescription(BinaryReader reader)
    Parameters
    Type Name Description
    BinaryReader reader

    The binary reader.

    Returns
    Type Description
    TextureDescription

    The texture description.

    ReadUnmanaged<T>(BinaryReader)

    Reads a struct from a binary reader.

    Declaration
    public static T ReadUnmanaged<T>(BinaryReader reader) where T : unmanaged
    Parameters
    Type Name Description
    BinaryReader reader

    The binary reader.

    Returns
    Type Description
    T

    The read struct value.

    Type Parameters
    Name Description
    T

    The type to read.

    StartsWith(byte[], byte[])

    Starts with.

    Declaration
    public static bool StartsWith(byte[] thisBytes, byte[] thatBytes)
    Parameters
    Type Name Description
    byte[] thisBytes

    Source byte array.

    byte[] thatBytes

    Pattern byte array.

    Returns
    Type Description
    bool

    True if thisBytes starts with thatBytes.

    WriteTextureDescription(BinaryWriter, TextureDescription)

    Writes a texture description to a binary writer.

    Declaration
    public static void WriteTextureDescription(BinaryWriter writer, TextureDescription description)
    Parameters
    Type Name Description
    BinaryWriter writer

    The binary writer.

    TextureDescription description

    The texture description.

    WriteUnmanaged<T>(BinaryWriter, T)

    Writes an unmanaged type to a binary writer.

    Declaration
    public static void WriteUnmanaged<T>(BinaryWriter writer, T value) where T : unmanaged
    Parameters
    Type Name Description
    BinaryWriter writer

    The binary writer.

    T value

    The struct value to write.

    Type Parameters
    Name Description
    T

    The type to write.

    In this article
    Back to top
    Generated by DocFX