diff options
| author | Tim Redfern <tim@herge.(none)> | 2013-04-24 16:42:42 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@herge.(none)> | 2013-04-24 16:42:42 +0100 |
| commit | 7cd6f032cc0e10edcd6bebedfd2e0de38ef2d40a (patch) | |
| tree | 61f13f30ee4bfe40958aaab85a65fd41c6875b0d /rotord/Pixels.h | |
| parent | a2c6354640f24db3484ccf486c2c0cbd08808e60 (diff) | |
uuencode functionality in place
Diffstat (limited to 'rotord/Pixels.h')
| -rw-r--r-- | rotord/Pixels.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/rotord/Pixels.h b/rotord/Pixels.h new file mode 100644 index 0000000..84942af --- /dev/null +++ b/rotord/Pixels.h @@ -0,0 +1,27 @@ +#include <stdint.h> +#include <algorithm> +//for now always uint8_t* rather than templated + +class Pixels{ + public: + ~Pixels(); + void allocate(int w, int h, int channels); + bool isAllocated() const; + void setFromExternalPixels(uint8_t * newPixels,int w, int h, int channels); + uint8_t * getPixels(); + int getWidth() const; + int getHeight() const; + void clear(); + void swap(Pixels & pix); + int getBytesPerPixel() const; + int getNumChannels() const; + void set(uint8_t val); + private: + uint8_t * pixels; + int width; + int height; + int channels; + bool bAllocated; + bool pixelsOwner; // if set from external data don't delete it +}; + |
