From 7cd6f032cc0e10edcd6bebedfd2e0de38ef2d40a Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 24 Apr 2013 16:42:42 +0100 Subject: uuencode functionality in place --- rotord/Pixels.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 rotord/Pixels.h (limited to 'rotord/Pixels.h') 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 +#include +//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 +}; + -- cgit v1.2.3