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