Blame toonz/sources/image/bmp/tiio_bmp.h
|
Shinya Kitaoka |
810553 |
#pragma once
|
|
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 |
|
|
Shinya Kitaoka |
120a6e |
class TImageReaderBmp : public TImageReader {
|
|
Shinya Kitaoka |
120a6e |
int m_lx, m_ly;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TImageReaderBmp(const TFilePath &f) : TImageReader(f) {}
|
|
Shinya Kitaoka |
120a6e |
~TImageReaderBmp() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
// not implemented
|
|
Shinya Kitaoka |
120a6e |
TImageReaderBmp(const TImageReaderBmp &);
|
|
Shinya Kitaoka |
120a6e |
TImageReaderBmp &operator=(const TImageReaderBmp &src);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TImageP load();
|
|
Shinya Kitaoka |
120a6e |
// void load(const TRasterP &rasP, const TPoint &pos = TPoint(0,0), int
|
|
Shinya Kitaoka |
120a6e |
// shrinkX = 1, int shrinkY = 1);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
static TImageReader *create(const TFilePath &f) {
|
|
Shinya Kitaoka |
120a6e |
return new TImageReaderBmp(f);
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
TDimension getSize() const;
|
|
Shinya Kitaoka |
120a6e |
TRect getBBox() const;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//===========================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class TImageWriterBmp : public TImageWriter {
|
|
Shinya Kitaoka |
120a6e |
int m_lx, m_ly;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TImageWriterBmp(const TFilePath &f) : TImageWriter(f) {}
|
|
Shinya Kitaoka |
120a6e |
~TImageWriterBmp() {}
|
|
Shinya Kitaoka |
120a6e |
bool is64bitOutputSupported() { return false; }
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
// not implemented
|
|
Shinya Kitaoka |
120a6e |
TImageWriterBmp(const TImageWriterBmp &);
|
|
Shinya Kitaoka |
120a6e |
TImageWriterBmp &operator=(const TImageWriterBmp &src);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
void save(const TImageP &);
|
|
Shinya Kitaoka |
120a6e |
static TImageWriter *create(const TFilePath &f) {
|
|
Shinya Kitaoka |
120a6e |
return new TImageWriterBmp(f);
|
|
Shinya Kitaoka |
120a6e |
};
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif
|