2012-08-27 22:34:37 +00:00
|
|
|
#ifndef _COMPRESSED_IMAGE_H_
|
|
|
|
#define _COMPRESSED_IMAGE_H_
|
|
|
|
|
|
|
|
enum ECompressionFormat {
|
|
|
|
eCompressionFormat_DXT1,
|
|
|
|
eCompressionFormat_DXT5,
|
|
|
|
eCompressionFormat_BPTC,
|
|
|
|
|
|
|
|
kNumCompressionFormats
|
|
|
|
};
|
|
|
|
|
|
|
|
class CompressedImage {
|
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned char *m_Data;
|
|
|
|
unsigned int m_DataSz;
|
|
|
|
unsigned int m_Width;
|
|
|
|
unsigned int m_Height;
|
|
|
|
ECompressionFormat m_Format;
|
|
|
|
|
|
|
|
void InitData(const unsigned char *withData);
|
|
|
|
public:
|
2012-08-28 02:49:00 +00:00
|
|
|
CompressedImage();
|
2012-08-27 22:34:37 +00:00
|
|
|
CompressedImage(
|
|
|
|
const unsigned int width,
|
|
|
|
const unsigned int height,
|
|
|
|
const ECompressionFormat format,
|
|
|
|
const unsigned char *data
|
|
|
|
);
|
|
|
|
|
|
|
|
CompressedImage( const CompressedImage &other );
|
|
|
|
~CompressedImage();
|
2012-09-18 23:00:20 +00:00
|
|
|
|
|
|
|
bool DecompressImage(unsigned char *outBuf, unsigned int outBufSz) const;
|
2012-08-27 22:34:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _COMPRESSED_IMAGE_H_
|