openMSX
PNG.hh
Go to the documentation of this file.
1 #ifndef PNG_HH
2 #define PNG_HH
3 
4 #include "SDLSurfacePtr.hh"
5 #include <string>
6 
7 struct SDL_PixelFormat;
8 
9 namespace openmsx {
10 
13 namespace PNG {
20  SDLSurfacePtr load(const std::string& filename, bool want32bpp);
21 
22  void save(unsigned width, unsigned height, const void** rowPointers,
23  const SDL_PixelFormat& format, const std::string& filename);
24  void save(unsigned width, unsigned height, const void** rowPointers,
25  const std::string& filename);
26  void saveGrayscale(unsigned width, unsigned height,
27  const void** rowPointers, const std::string& filename);
28 
29 } // namespace PNG
30 } // namespace openmsx
31 
32 #endif // PNG_HH
Wrapper around a SDL_Surface.
SDLSurfacePtr load(const std::string &filename, bool want32bpp)
Load the given PNG file in a SDL_Surface.
Definition: PNG.cc:92
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
void saveGrayscale(unsigned width, unsigned height, const void **rowPointers, const std::string &filename)
Definition: PNG.cc:402
void save(unsigned width, unsigned height, const void **rowPointers, const SDL_PixelFormat &format, const std::string &filename)
Definition: PNG.cc:382