image.h
Go to the documentation of this file.
00001 #ifndef IZ_IMAGE_H
00002 #define IZ_IMAGE_H 1
00003 
00004 #include <cstddef>
00005 
00006 namespace IZ {
00007 
00008 template<
00009     typename Sample = unsigned char,
00010     ptrdiff_t samplesPerPixel = 3
00011 >
00012 class Image
00013 {
00014 public:
00015     int width() const { return m_width; }
00016     int height() const { return m_height; }
00017     ptrdiff_t samplesPerLine() const { return m_spl; }
00018     Sample *data() const { return m_data; }
00019 
00020     void setWidth(int width) { m_width = width; }
00021     void setHeight(int height) { m_height = height; }
00022     void setSamplesPerLine(ptrdiff_t samplesPerLine) { m_spl = samplesPerLine; }
00023     void setData(Sample *data) { m_data = data; }
00024 
00025 protected:
00026     int m_width;
00027     int m_height;
00028     ptrdiff_t m_spl;
00029     Sample *m_data;
00030 };
00031 
00032 } // namespace IZ
00033 
00034 #endif


imagezero
Author(s):
autogenerated on Thu Jun 6 2019 21:34:51