mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-23 02:23:38 +00:00
30 lines
754 B
C++
30 lines
754 B
C++
#ifndef _IMAGE_FILE_H_
|
|
#define _IMAGE_FILE_H_
|
|
|
|
#include "ImageFileFormat.h"
|
|
|
|
class ImageFile {
|
|
|
|
public:
|
|
|
|
ImageFile(const char *filename);
|
|
ImageFile(const char *filename, EImageFileFormat format);
|
|
~ImageFile();
|
|
|
|
unsigned int GetWidth() const { return m_Width; }
|
|
unsigned int GetHeight() const { return m_Height; }
|
|
const unsigned char *GetPixels() const { return m_PixelData; }
|
|
|
|
private:
|
|
unsigned int m_Handle;
|
|
unsigned int m_Width;
|
|
unsigned int m_Height;
|
|
unsigned char *m_PixelData;
|
|
const EImageFileFormat m_FileFormat;
|
|
|
|
static unsigned char *ReadFileData(const char *filename);
|
|
static EImageFileFormat DetectFileFormat(const char *filename);
|
|
|
|
bool LoadImage(const unsigned char *rawImageData);
|
|
};
|
|
#endif // _IMAGE_FILE_H_
|