Table of Contents

Class Image

Namespace
WoWLib.Formats.BLP
Assembly
WoWLib.dll

A decoded texture surface: 8-bit RGBA pixels in row-major order, row 0 at the top. pixels holds width * height * 4 bytes (r, g, b, a per pixel) and maps to NumPy zero-copy; reshape to (height, width, 4).

public class Image : IDisposable
Inheritance
Image
Implements
Inherited Members

Constructors

Image()

public Image()

Image(uint, uint, byte[])

public Image(uint width, uint height, byte[] pixels)

Parameters

width uint
height uint
pixels byte[]

Image(Image)

Copy-construct: a deep copy of other (the C++ copy constructor).

public Image(Image other)

Parameters

other Image

Properties

Height

The height in pixels.

public uint Height { get; set; }

Property Value

uint

Pixels

The RGBA8 pixel bytes, width * height * 4, row-major from the top-left.

public Vector<byte> Pixels { get; }

Property Value

Vector<byte>

Width

The width in pixels.

public uint Width { get; set; }

Property Value

uint

Methods

Dispose()

Release the native object now. Optional: the finalizer releases it on collection anyway - dispose (or using) when you want native memory back promptly.

public virtual void Dispose()

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Reference-identity hash (the C++ type has no hash to mirror).

public override int GetHashCode()

Returns

int

Operators

operator ==(Image?, Image?)

public static bool operator ==(Image? l, Image? r)

Parameters

l Image
r Image

Returns

bool

operator !=(Image?, Image?)

public static bool operator !=(Image? l, Image? r)

Parameters

l Image
r Image

Returns

bool