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 <span>
6#include <string>
7
10namespace openmsx::PNG {
17 [[nodiscard]] SDLSurfacePtr load(const std::string& filename, bool want32bpp);
18
19 void saveRGBA(size_t width, std::span<const void*> rowPointers,
20 const std::string& filename);
21 void saveGrayscale(size_t width, std::span<const void*> rowPointers,
22 const std::string& filename);
23
24} // namespace openmsx::PNG
25
26#endif // PNG_HH
Wrapper around a SDL_Surface.
Utility functions to hide the complexity of saving to a PNG file.
Definition PNG.cc:27
void saveRGBA(size_t width, std::span< const void * > rowPointers, const std::string &filename)
Definition PNG.cc:323
void saveGrayscale(size_t width, std::span< const void * > rowPointers, const std::string &filename)
Definition PNG.cc:341
SDLSurfacePtr load(const std::string &filename, bool want32bpp)
Load the given PNG file in a SDL_Surface.
Definition PNG.cc:104