mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 14:25:53 +01:00
41 lines
886 B
C++
41 lines
886 B
C++
#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:
|
|
CompressedImage();
|
|
CompressedImage(
|
|
const unsigned int width,
|
|
const unsigned int height,
|
|
const ECompressionFormat format,
|
|
const unsigned char *data
|
|
);
|
|
|
|
unsigned int GetHeight() const { return m_Height; }
|
|
unsigned int GetWidth() const { return m_Width; }
|
|
|
|
CompressedImage( const CompressedImage &other );
|
|
~CompressedImage();
|
|
|
|
bool DecompressImage(unsigned char *outBuf, unsigned int outBufSz) const;
|
|
};
|
|
|
|
#endif // _COMPRESSED_IMAGE_H_
|