Actually call on_reset callback
[lsnes.git] / include / library / png.hpp
blobf0367f8387b22ed1942b812c31f5d3bbff3f36bc
1 #ifndef _library__png__hpp__included__
2 #define _library__png__hpp__included__
4 #include <cstdlib>
5 #include <cstdint>
6 #include <vector>
7 #include <string>
8 #include <iostream>
10 namespace png
12 struct decoder
14 decoder();
15 decoder(std::istream& file);
16 decoder(const std::string& file);
17 size_t width;
18 size_t height;
19 bool has_palette;
20 std::vector<uint32_t> data;
21 std::vector<uint32_t> palette;
22 private:
23 void decode_png(std::istream& file);
26 struct encoder
28 encoder();
29 size_t width;
30 size_t height;
31 bool has_palette;
32 bool has_alpha;
33 uint32_t colorkey;
34 std::vector<uint32_t> data;
35 std::vector<uint32_t> palette;
36 void encode(const std::string& file) const;
37 void encode(std::ostream& file) const;
41 #endif