2012-08-26 18:46:47 +00:00
|
|
|
#include "ImageFile.h"
|
|
|
|
|
2012-08-26 20:37:10 +00:00
|
|
|
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() {
|
2012-08-26 20:37:10 +00:00
|
|
|
if(m_PixelData) {
|
|
|
|
delete [] m_PixelData;
|
|
|
|
}
|
2012-08-26 18:46:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ImageFile::GetPixels() const {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-08-26 20:37:10 +00:00
|
|
|
EImageFileFormat ImageFile::DetectFileFormat() {
|
|
|
|
}
|
2012-08-26 18:46:47 +00:00
|
|
|
|
2012-08-26 20:37:10 +00:00
|
|
|
void ImageFile::LoadImage(const unsigend char *rawImageData) {
|
2012-08-26 18:46:47 +00:00
|
|
|
}
|
|
|
|
|
2012-08-26 20:37:10 +00:00
|
|
|
void ImageFile::LoadPNGImage(const unsigned char *rawImageData) {
|
2012-08-26 18:46:47 +00:00
|
|
|
}
|
|
|
|
|
2012-08-26 20:37:10 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
unsigned char *ImageFile::ReadFileData(const char *filename) {
|
2012-08-26 18:46:47 +00:00
|
|
|
|
|
|
|
}
|
2012-08-26 20:37:10 +00:00
|
|
|
#else
|
|
|
|
unsigned char *ImageFile::ReadFileData(const char *filename) {
|
2012-08-26 18:46:47 +00:00
|
|
|
|
2012-08-26 20:37:10 +00:00
|
|
|
}
|
2012-08-26 18:46:47 +00:00
|
|
|
#endif
|