openMSX
PNG.hh
Go to the documentation of this file.
1 #ifndef PNG_HH
2 #define PNG_HH
3 
4 #include "PixelFormat.hh"
5 #include "SDLSurfacePtr.hh"
6 #include <string>
7 
10 namespace openmsx::PNG {
17  SDLSurfacePtr load(const std::string& filename, bool want32bpp);
18 
19  void save(unsigned width, unsigned height, const void** rowPointers,
20  const PixelFormat& format, const std::string& filename);
21  void save(unsigned width, unsigned height, const void** rowPointers,
22  const std::string& filename);
23  void saveGrayscale(unsigned width, unsigned height,
24  const void** rowPointers, const std::string& filename);
25 
26 } // namespace openmsx::PNG
27 
28 #endif // PNG_HH
openmsx::PNG::save
void save(unsigned width, unsigned height, const void **rowPointers, const PixelFormat &format, const std::string &filename)
Definition: PNG.cc:371
SDLSurfacePtr
Wrapper around a SDL_Surface.
Definition: SDLSurfacePtr.hh:34
SDLSurfacePtr.hh
openmsx::filename
constexpr const char *const filename
Definition: FirmwareSwitch.cc:10
openmsx::PNG::load
SDLSurfacePtr load(const std::string &filename, bool want32bpp)
Load the given PNG file in a SDL_Surface.
Definition: PNG.cc:95
openmsx::PNG::saveGrayscale
void saveGrayscale(unsigned width, unsigned height, const void **rowPointers, const std::string &filename)
Definition: PNG.cc:391
PixelFormat.hh
openmsx::PNG
Utility functions to hide the complexity of saving to a PNG file.
Definition: PNG.cc:18