diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderPNG.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderPNG.h b/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderPNG.h new file mode 100644 index 0000000..a3faac2 --- /dev/null +++ b/libraries/irrlicht-1.8/source/Irrlicht/CImageLoaderPNG.h | |||
@@ -0,0 +1,45 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | ||
2 | // This file is part of the "Irrlicht Engine". | ||
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | ||
4 | |||
5 | // this file was created by rt (www.tomkorp.com), based on ttk's png-reader | ||
6 | // i wanted to be able to read in PNG images with irrlicht :) | ||
7 | // why? lossless compression with 8-bit alpha channel! | ||
8 | |||
9 | #ifndef __C_IMAGE_LOADER_PNG_H_INCLUDED__ | ||
10 | #define __C_IMAGE_LOADER_PNG_H_INCLUDED__ | ||
11 | |||
12 | #include "IrrCompileConfig.h" | ||
13 | |||
14 | #ifdef _IRR_COMPILE_WITH_PNG_LOADER_ | ||
15 | |||
16 | #include "IImageLoader.h" | ||
17 | |||
18 | namespace irr | ||
19 | { | ||
20 | namespace video | ||
21 | { | ||
22 | |||
23 | //! Surface Loader for PNG files | ||
24 | class CImageLoaderPng : public IImageLoader | ||
25 | { | ||
26 | public: | ||
27 | |||
28 | //! returns true if the file maybe is able to be loaded by this class | ||
29 | //! based on the file extension (e.g. ".png") | ||
30 | virtual bool isALoadableFileExtension(const io::path& filename) const; | ||
31 | |||
32 | //! returns true if the file maybe is able to be loaded by this class | ||
33 | virtual bool isALoadableFileFormat(io::IReadFile* file) const; | ||
34 | |||
35 | //! creates a surface from the file | ||
36 | virtual IImage* loadImage(io::IReadFile* file) const; | ||
37 | }; | ||
38 | |||
39 | |||
40 | } // end namespace video | ||
41 | } // end namespace irr | ||
42 | |||
43 | #endif | ||
44 | #endif | ||
45 | |||