JPC-RR r11.7
[jpcrr.git] / streamtools / png-out.hpp
blob21cad7ca002fd70b88189b4f44322434abfb5f02
1 #ifndef _png_out__hpp__included__
2 #define _png_out__hpp__included__
4 #include <stdint.h>
5 #include <string>
6 #include "newpacket.hpp"
8 struct image_frame
10 public:
11 image_frame(uint32_t width, uint32_t height);
12 image_frame(struct packet& p);
13 ~image_frame();
14 image_frame(const image_frame& x);
15 image_frame& operator=(const image_frame& x);
16 uint32_t get_height() const;
17 uint32_t get_width() const;
18 unsigned char* get_pixels(); //RGB data.
19 const unsigned char* get_pixels() const; //RGB data.
20 bool save_png(const std::string& name);
21 private:
22 uint32_t width;
23 uint32_t height;
24 unsigned char* imagedata; //RGB.
27 #endif