C# Class Warcraft.BLP.BLPHeader

This class represents a file header for a binary BLP image. Its primary function is to map the rest of the data in a meaningful way, and describe the image format the BLP image is stored as.
Mostrar archivo Open project: Nihlus/libwarcraft Class Usage Examples

Public Properties

Property Type Description
AlphaBitDepth uint
CompressionType TextureCompressionType
Format BLPFormat
MipMapOffsets List
MipMapSizes List
MipMapType uint
PixelFormat BLPPixelFormat
Resolution Resolution
Signature string
Version uint

Public Methods

Method Description
BLPHeader ( ) : System

Initializes a new instance of the Warcraft.BLP.BLPHeader class. This constructor creates a template header, ready to be filled with data about a new file.

BLPHeader ( byte InData ) : System

Initializes a new instance of the Warcraft.BLP.BLPHeader class. This constructor creates a header from input data read from a BLP file. Usually, this is 148 bytes.

GetNumMipMaps ( ) : int

Gets the number of mipmaps defined in the header.

GetSize ( ) : uint

Gets the size of a complete header. This is always 148 bytes, since the offset and size lists are padded.

ToByteArray ( ) : byte[]

Gets the data in the header as a byte array, ready to be written to a file.

Method Details

BLPHeader() public method

Initializes a new instance of the Warcraft.BLP.BLPHeader class. This constructor creates a template header, ready to be filled with data about a new file.
public BLPHeader ( ) : System
return System

BLPHeader() public method

Initializes a new instance of the Warcraft.BLP.BLPHeader class. This constructor creates a header from input data read from a BLP file. Usually, this is 148 bytes.
public BLPHeader ( byte InData ) : System
InData byte Data.
return System

GetNumMipMaps() public method

Gets the number of mipmaps defined in the header.
public GetNumMipMaps ( ) : int
return int

GetSize() public method

Gets the size of a complete header. This is always 148 bytes, since the offset and size lists are padded.
public GetSize ( ) : uint
return uint

ToByteArray() public method

Gets the data in the header as a byte array, ready to be written to a file.
public ToByteArray ( ) : byte[]
return byte[]

Property Details

AlphaBitDepth public_oe property

The alpha bit depth of the mipmaps. Depends on the compression type.
public uint AlphaBitDepth
return uint

CompressionType public_oe property

The type of the compression used for the mipmaps stored in the BLP file.
public TextureCompressionType CompressionType
return TextureCompressionType

Format public_oe property

public BLPFormat Format
return BLPFormat

MipMapOffsets public_oe property

A list of offsets to the start of each mipmap.
public List MipMapOffsets
return List

MipMapSizes public_oe property

A list of sizes for each mipmap.
public List MipMapSizes
return List

MipMapType public_oe property

The type of the mip map stored in the image.
public uint MipMapType
return uint

PixelFormat public_oe property

The pixel format of the compressed textures.
public BLPPixelFormat PixelFormat
return BLPPixelFormat

Resolution public_oe property

The resolution of the image.
public Resolution Resolution
return Resolution

Signature public_oe property

The binary signature of a BLP file.
public string Signature
return string

Version public_oe property

The version of the BLP file.
public uint Version
return uint