Table of Contents

Class EncodeSettings

Namespace
WoWLib.Formats.BLP
Assembly
WoWLib.dll

How encode() should build the file. The defaults produce what the client ships most: DXT compression with the block format chosen from the alpha depth (0 -> BC1, 1 -> BC1 punch-through, 4 -> BC2, 8 -> BC3), with a full generated mip chain.

public class EncodeSettings : IDisposable
Inheritance
EncodeSettings
Implements
Inherited Members

Constructors

EncodeSettings()

public EncodeSettings()

EncodeSettings(ColorEncoding, PixelFormat, byte, bool)

public EncodeSettings(ColorEncoding encoding, PixelFormat format, byte alphaDepth, bool mipmaps)

Parameters

encoding ColorEncoding
format PixelFormat
alphaDepth byte
mipmaps bool

EncodeSettings(EncodeSettings)

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

public EncodeSettings(EncodeSettings other)

Parameters

other EncodeSettings

Properties

AlphaDepth

Alpha bits per pixel: 0, 1, 4 or 8. Selects the alpha plane depth for Palettized files and the block format for Dxt when format is Unspecified.

public byte AlphaDepth { get; set; }

Property Value

byte

Encoding

The payload encoding to produce (Palettized, Dxt or Bgra; Jpeg is not supported).

public ColorEncoding Encoding { get; set; }

Property Value

ColorEncoding

Format

The DXT block format for Dxt encoding (Dxt1, Dxt3, Dxt5 or Bc5). Unspecified picks from alphaDepth: 0/1 -> Dxt1, 4 -> Dxt3, 8 -> Dxt5. Ignored for Palettized/Bgra.

public PixelFormat Format { get; set; }

Property Value

PixelFormat

Mipmaps

Whether to generate the full mip chain down to 1x1 (box-filtered). Off: the file holds only level 0.

public bool Mipmaps { get; set; }

Property Value

bool

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 ==(EncodeSettings?, EncodeSettings?)

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

Parameters

l EncodeSettings
r EncodeSettings

Returns

bool

operator !=(EncodeSettings?, EncodeSettings?)

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

Parameters

l EncodeSettings
r EncodeSettings

Returns

bool