FasTC/IO/ImageFile.cpp

49 lines
894 B
C++
Raw Normal View History

2012-08-26 18:46:47 +00:00
#include "ImageFile.h"
ImageFile::ImageFile(const char *filename) :
m_PixelData(0)
{
unsigned char *rawData = ReadFileData(filename);
DetectFileFormat(filename);
LoadImage(rawData);
delete [] rawData;
}
ImageFile::ImageFile(const char *filename, EImageFileFormat format) :
m_FileFormat(format),
m_PixelData(0)
{
unsigned char *rawData = ReadFileData(filename);
LoadImage(rawData);
delete [] rawData;
2012-08-26 18:46:47 +00:00
}
ImageFile::~ImageFile() {
if(m_PixelData) {
delete [] m_PixelData;
}
2012-08-26 18:46:47 +00:00
}
void ImageFile::GetPixels() const {
}
EImageFileFormat ImageFile::DetectFileFormat() {
}
2012-08-26 18:46:47 +00:00
void ImageFile::LoadImage(const unsigend char *rawImageData) {
2012-08-26 18:46:47 +00:00
}
void ImageFile::LoadPNGImage(const unsigned char *rawImageData) {
2012-08-26 18:46:47 +00:00
}
#ifdef _MSC_VER
unsigned char *ImageFile::ReadFileData(const char *filename) {
2012-08-26 18:46:47 +00:00
}
#else
unsigned char *ImageFile::ReadFileData(const char *filename) {
2012-08-26 18:46:47 +00:00
}
2012-08-26 18:46:47 +00:00
#endif