1 #pragma once 2 3 #ifndef TTIO_BMP_INCLUDED 4 #define TTIO_BMP_INCLUDED 5 6 #include "timage_io.h" 7 8 class TImageReaderBmp : public TImageReader { 9 int m_lx, m_ly; 10 11 public: TImageReaderBmp(const TFilePath & f)12 TImageReaderBmp(const TFilePath &f) : TImageReader(f) {} ~TImageReaderBmp()13 ~TImageReaderBmp() {} 14 15 private: 16 // not implemented 17 TImageReaderBmp(const TImageReaderBmp &); 18 TImageReaderBmp &operator=(const TImageReaderBmp &src); 19 20 public: 21 TImageP load(); 22 // void load(const TRasterP &rasP, const TPoint &pos = TPoint(0,0), int 23 // shrinkX = 1, int shrinkY = 1); 24 create(const TFilePath & f)25 static TImageReader *create(const TFilePath &f) { 26 return new TImageReaderBmp(f); 27 }; 28 29 TDimension getSize() const; 30 TRect getBBox() const; 31 }; 32 33 //=========================================================================== 34 35 class TImageWriterBmp : public TImageWriter { 36 int m_lx, m_ly; 37 38 public: TImageWriterBmp(const TFilePath & f)39 TImageWriterBmp(const TFilePath &f) : TImageWriter(f) {} ~TImageWriterBmp()40 ~TImageWriterBmp() {} is64bitOutputSupported()41 bool is64bitOutputSupported() { return false; } 42 43 private: 44 // not implemented 45 TImageWriterBmp(const TImageWriterBmp &); 46 TImageWriterBmp &operator=(const TImageWriterBmp &src); 47 48 public: 49 void save(const TImageP &); create(const TFilePath & f)50 static TImageWriter *create(const TFilePath &f) { 51 return new TImageWriterBmp(f); 52 }; 53 }; 54 55 #endif 56