Blame toonz/sources/image/bmp/tiio_bmp.h
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef TTIO_BMP_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
#define TTIO_BMP_INCLUDED
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "timage_io.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TImageReaderBmp : public TImageReader
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
int m_lx, m_ly;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TImageReaderBmp(const TFilePath &f) : TImageReader(f) {}
|
|
Toshihiro Shimizu |
890ddd |
~TImageReaderBmp() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
// not implemented
|
|
Toshihiro Shimizu |
890ddd |
TImageReaderBmp(const TImageReaderBmp &);
|
|
Toshihiro Shimizu |
890ddd |
TImageReaderBmp &operator=(const TImageReaderBmp &src);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TImageP load();
|
|
Toshihiro Shimizu |
890ddd |
//void load(const TRasterP &rasP, const TPoint &pos = TPoint(0,0), int shrinkX = 1, int shrinkY = 1);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
static TImageReader *create(const TFilePath &f)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
return new TImageReaderBmp(f);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
TDimension getSize() const;
|
|
Toshihiro Shimizu |
890ddd |
TRect getBBox() const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//===========================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TImageWriterBmp : public TImageWriter
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
int m_lx, m_ly;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
TImageWriterBmp(const TFilePath &f) : TImageWriter(f) {}
|
|
Toshihiro Shimizu |
890ddd |
~TImageWriterBmp() {}
|
|
Toshihiro Shimizu |
890ddd |
bool is64bitOutputSupported() { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Toshihiro Shimizu |
890ddd |
// not implemented
|
|
Toshihiro Shimizu |
890ddd |
TImageWriterBmp(const TImageWriterBmp &);
|
|
Toshihiro Shimizu |
890ddd |
TImageWriterBmp &operator=(const TImageWriterBmp &src);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Toshihiro Shimizu |
890ddd |
void save(const TImageP &);
|
|
Toshihiro Shimizu |
890ddd |
static TImageWriter *create(const TFilePath &f)
|
|
Toshihiro Shimizu |
890ddd |
{
|
|
Toshihiro Shimizu |
890ddd |
return new TImageWriterBmp(f);
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|