lsnes/include/library/png.hpp

22 lines
623 B
C++
Raw Normal View History

2012-11-13 22:01:12 +02:00
#ifndef _library__png__hpp__included__
#define _library__png__hpp__included__
#include <stdexcept>
#include <cstdint>
#include <string>
2011-09-16 21:09:22 +03:00
/**
* Save a PNG.
*
* parameter file: Filename to save to.
* parameter data24: 3 elements per pixel (r,g, b) per pixel, left-to-right, top-to-bottom order.
* parameter width: Width of the image.
* parameter height: Height of the image.
* throws std::bad_alloc: Not enough memory.
* throws std::runtime_error: Error saving PNG.
*/
void save_png_data(const std::string& file, uint8_t* data24, uint32_t width, uint32_t height) throw(std::bad_alloc,
std::runtime_error);
2011-09-16 21:09:22 +03:00
#endif