Свойство | Type | Description | |
---|---|---|---|
Header |
Méthode | Description | |
---|---|---|
BLP ( |
Initializes a new instance of the Warcraft.BLP.BLP class. This constructor creates a BLP file using the specified compression from a bitmap object. If the compression type specifed is DXTC, the default pixel format used is DXT1 for opaque textures and DXT3 for the rest.
|
|
BLP ( byte inData ) : System |
Initializes a new instance of the Warcraft.BLP.BLP class. This constructor reads a binary BLP file from disk.
|
|
GetAlphaBitDepth ( ) : uint |
Gets the alpha bit depth. This value represents where the alpha value for each pixel is stored.
|
|
GetBestMipMap ( uint maxResolution ) : |
Gets the best mip map for the specified resolution, where the specified resolution is the maximum resolution for any dimension in the image.
|
|
GetCompressionType ( ) : TextureCompressionType |
Gets the type of compression used in the image.
|
|
GetFileType ( ) : string |
Gets the magic string that identifies this file.
|
|
GetFormat ( ) : BLPFormat |
Gets the format of the BLP image.
|
|
GetMipLevelResolution ( uint mipLevel ) : Resolution |
Gets the resolution of the specified mip level
|
|
GetMipMap ( uint mipLevel ) : |
Gets a bitmap representing the given zero-based mipmap level. This creates a new Bitmap object from one of the raw mipmaps stored in the image.
|
|
GetMipMapCount ( ) : int |
Gets the number of mipmap levels in the image.
|
|
GetMipMapLevelStrings ( ) : List |
Gets a list of formatted strings describing the mipmap levels.
|
|
GetPixelFormat ( ) : BLPPixelFormat |
Gets the BLP pixel format. This format represents a subtype of the compression used in the file.
|
|
GetRawMipMap ( uint mipLevel ) : byte[] |
Gets the compressed data for the specified mipmap level.
|
|
GetResolution ( ) : Resolution |
Gets the resolution of the image.
|
|
GetVersion ( ) : uint |
Gets the version of the BLP file.
|
|
Serialize ( ) : byte[] |
Gets the BLP image object as a byte array, which can be written to disk as a file.
|
Méthode | Description | |
---|---|---|
CompressImage ( Image inImage ) : List |
Compresses an input bitmap into a list of mipmap using the file's compression settings. Mipmap levels which would produce an image with dimensions smaller than 1x1 will return null instead. The number of mipmaps returned will be Warcraft.BLP.BLP.GetNumReasonableMipMapLevels + 1.
|
|
CompressImage ( Image inImage, uint mipLevel ) : byte[] |
Compresses in input bitmap into a single mipmap at the specified mipmap level, where a mip level is a bisection of the resolution. For instance, a mip level of 2 applied to a 64x64 image would produce an image with a resolution of 16x16. This function expects the mipmap level to be reasonable (i.e, not a level which would produce a mip smaller than 1x1)
|
|
Decode1BitAlpha ( byte inData ) : List |
Decodes a 1-bit alpha map into a list of byte values. The resulting list will be values of either 0 or 255.
|
|
Decode4BitAlpha ( byte inData ) : List |
Decodes a compressed 4-bit alpha map into a list of byte values.
|
|
DecompressMipMap ( byte inData, uint mipLevel ) : |
Decompresses a mipmap in the file at the specified level from the specified data.
|
|
Encode1BitAlpha ( |
Encodes the alpha data of the provided image as a packed byte array of alpha values. 8 alpha values are stored in each byte as a 1 (fully opaque) or a 0 (fully transparent).
|
|
Encode4BitAlpha ( |
Encodes the alpha data of the provided image as a packed byte array of alpha values. 2 alpha values are stored in each byte as a uint4_t integer value.
|
|
FindClosestMatchingColor ( Color inColour ) : Color |
Finds the closest matching color in the palette for the given input color.
|
|
GeneratePalette ( Image inImage ) : void |
Generates an indexed 256-color palette from the specified image and overwrites the current palette with it. Ordinarily, this would be the original mipmap.
|
|
GetLevelAdjustedResolutionValue ( uint resolutionValue, uint mipLevel ) : uint |
Gets a resolution value (height or width) adjusted by the specified mipmap level. In practice, this is a division by the level as far as possible. A greater mip returns a lower resolution value, to a maximum of 1.
|
|
GetMipMapBytes ( ) : byte[] |
Gets the raw, BLP-encoded mipmaps as a byte array for writing to disk.
|
|
GetNumReasonableMipMapLevels ( ) : uint |
Gets the number of mipmaps which can be produced in this file without producing a mipmap smaller than 1x1.
|
|
GetPaletteBytes ( ) : byte[] |
Gets the raw bytes of the palette (or an array with length 0 if there isn't a palette)
|
|
PeekFormat ( |
Peeks the format of the current file.
|
|
ResizeImage ( Image inImage, int imageWidth, int imageHeight ) : |
Resize the image to the specified width and height. Credit goes to https://stackoverflow.com/questions/1922040/resize-an-image-c-sharp (mpen)
|
public BLP ( |
||
image | Image. | |
compressionType | TextureCompressionType | Compression type. |
Résultat | System |
public GetBestMipMap ( uint maxResolution ) : |
||
maxResolution | uint | Max resolution. |
Résultat |
public GetCompressionType ( ) : TextureCompressionType | ||
Résultat | TextureCompressionType |
public GetMipLevelResolution ( uint mipLevel ) : Resolution | ||
mipLevel | uint | Mip level. |
Résultat | Resolution |
public GetMipMap ( uint mipLevel ) : |
||
mipLevel | uint | Mipmap level. |
Résultat |
public GetRawMipMap ( uint mipLevel ) : byte[] | ||
mipLevel | uint | The zero-based mipmap level. |
Résultat | byte[] |