tahoma2d/toonz/sources/image/bmp/tiio_bmp.h

56 lines
1.2 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef TTIO_BMP_INCLUDED
#define TTIO_BMP_INCLUDED
#include "timage_io.h"
2016-06-15 18:43:10 +12:00
class TImageReaderBmp : public TImageReader {
int m_lx, m_ly;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
TImageReaderBmp(const TFilePath &f) : TImageReader(f) {}
~TImageReaderBmp() {}
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
// not implemented
TImageReaderBmp(const TImageReaderBmp &);
TImageReaderBmp &operator=(const TImageReaderBmp &src);
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
TImageP load();
// void load(const TRasterP &rasP, const TPoint &pos = TPoint(0,0), int
// shrinkX = 1, int shrinkY = 1);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
static TImageReader *create(const TFilePath &f) {
return new TImageReaderBmp(f);
};
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TDimension getSize() const;
TRect getBBox() const;
2016-03-19 06:57:51 +13:00
};
//===========================================================================
2016-06-15 18:43:10 +12:00
class TImageWriterBmp : public TImageWriter {
int m_lx, m_ly;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
TImageWriterBmp(const TFilePath &f) : TImageWriter(f) {}
~TImageWriterBmp() {}
bool is64bitOutputSupported() { return false; }
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
// not implemented
TImageWriterBmp(const TImageWriterBmp &);
TImageWriterBmp &operator=(const TImageWriterBmp &src);
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
void save(const TImageP &);
static TImageWriter *create(const TFilePath &f) {
return new TImageWriterBmp(f);
};
2016-03-19 06:57:51 +13:00
};
#endif