lsnes rr0-β2
[lsnes.git] / png.hpp
blobe829bd31711bdf5c6f05d84bf82b1fc300f3f789
1 #ifndef _png__hpp__included__
2 #define _png__hpp__included__
4 #include <stdexcept>
5 #include <cstdint>
6 #include <string>
8 /**
9 * Save a PNG.
11 * parameter file: Filename to save to.
12 * parameter data24: 3 elements per pixel (r,g, b) per pixel, left-to-right, top-to-bottom order.
13 * parameter width: Width of the image.
14 * parameter height: Height of the image.
15 * throws std::bad_alloc: Not enough memory.
16 * throws std::runtime_error: Error saving PNG.
18 void save_png_data(const std::string& file, uint8_t* data24, uint32_t width, uint32_t height) throw(std::bad_alloc,
19 std::runtime_error);
21 #endif