From 02e9a70009f79064043033abc5e597930aa11079 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 23 Aug 2008 12:04:21 +0000 Subject: PNG support --- src/render/pngfile.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/render/pngfile.h (limited to 'src/render/pngfile.h') diff --git a/src/render/pngfile.h b/src/render/pngfile.h new file mode 100644 index 0000000..a7beb7c --- /dev/null +++ b/src/render/pngfile.h @@ -0,0 +1,34 @@ +/* + render/png.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + + +#ifndef _INCLUDED_RENDER_PNGFILE_H_ +#define _INCLUDED_RENDER_PNGFILE_H_ + +#include "render/image.h" + +namespace render +{ + +/// a class for loading and saving .png files +class PNG { + +public: + /// load a PNG image file from disk + /** @param filename short path to the filename to be loaded + */ + static Image *load(const char * filename); + + /// write an image to a PNG file + /** @param filename short path to the file to write the image data to + */ + static void save(const char *filename, Image & image); +}; + +} + +#endif //_INCLUDED_RENDER_PNGFILE_H_ + -- cgit v1.2.3