A project I am working on has me thinking of going two ways, 1) Use own "In House" images with come with the end product, or 2) Using a proprietary image format from the producers of the program my project is based on.
The image format is a RGBA image format. Though I have heard of it based off of JPEG libraries.
This is the header struct:
I'm not familar enough with the more advanced aspects of C# to know where to begin with this. Or how to go about it.
Please an suggestions?
The image format is a RGBA image format. Though I have heard of it based off of JPEG libraries.
This is the header struct:
Code:
struct BLP2Header
{
FourCC ID; // Always 'BLP2'
UInt32 Type;
UInt8 Encoding;
UInt8 AlphaDepth;
UInt8 AlphaEncoding;
UInt8 HasMips;
UInt32 Width;
UInt32 Height;+7
UInt32 Offsets[16];
UInt32 Lengths[16];
ARGBColor8 Palette[256];
};
Type
0: JPEG compression
1: Uncompressed or DirectX compression
Encoding
1: Uncompressed
2: DirectX compression
AlphaDepth
0: No alpha channel
1: 1 bit alpha
4: 4 bit alpha (DXT3 only)
8: 8 bit alpha
AlphaEncoding
0: DXT1 alpha (0 or 1 bit alpha)
1: DXT2/3 alpha (4 bit alpha)
7: DXT4/5 alpha (interpolated alpha)
HasMips
0: No mip levels
1: Mip levels present (the number of levels is determined by the image size)
Width, Height: Dimensions of the image in pixels (always a power of two)
Offsets[0]: Offset from the start of the file to the image data
Lengths[0]: Length in bytes of the image data
Palette: 4-byte BGRA color values for paletted textures (this field is present regardless of whether the texture actually uses palettes)
Please an suggestions?
Comment