image.h
Go to the documentation of this file.
1 #ifndef IZ_IMAGE_H
2 #define IZ_IMAGE_H 1
3 
4 #include <cstddef>
5 
6 namespace IZ {
7 
8 template<
9  typename Sample = unsigned char,
10  ptrdiff_t samplesPerPixel = 3
11 >
12 class Image
13 {
14 public:
15  int width() const { return m_width; }
16  int height() const { return m_height; }
17  ptrdiff_t samplesPerLine() const { return m_spl; }
18  Sample *data() const { return m_data; }
19 
20  void setWidth(int width) { m_width = width; }
21  void setHeight(int height) { m_height = height; }
23  void setData(Sample *data) { m_data = data; }
24 
25 protected:
26  int m_width;
27  int m_height;
28  ptrdiff_t m_spl;
29  Sample *m_data;
30 };
31 
32 } // namespace IZ
33 
34 #endif
Sample * data() const
Definition: image.h:18
void setData(Sample *data)
Definition: image.h:23
Sample * m_data
Definition: image.h:29
int width() const
Definition: image.h:15
Definition: bitcoder.h:6
int height() const
Definition: image.h:16
ptrdiff_t m_spl
Definition: image.h:28
void setWidth(int width)
Definition: image.h:20
void setHeight(int height)
Definition: image.h:21
int m_width
Definition: image.h:26
int m_height
Definition: image.h:27
void setSamplesPerLine(ptrdiff_t samplesPerLine)
Definition: image.h:22
ptrdiff_t samplesPerLine() const
Definition: image.h:17


imagezero
Author(s):
autogenerated on Mon Jun 10 2019 13:37:22