]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/CImageLoaderPNG.h
Reduce IrrCompileConfig usage to files that actually need it
[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 \r
13 #include "IImageLoader.h"\r
14 \r
15 namespace irr\r
16 {\r
17 namespace video\r
18 {\r
19 \r
20 //!  Surface Loader for PNG files\r
21 class CImageLoaderPng : public IImageLoader\r
22 {\r
23 public:\r
24 \r
25         //! returns true if the file maybe is able to be loaded by this class\r
26         //! based on the file extension (e.g. ".png")\r
27         bool isALoadableFileExtension(const io::path& filename) const override;\r
28 \r
29         //! returns true if the file maybe is able to be loaded by this class\r
30         bool isALoadableFileFormat(io::IReadFile* file) const override;\r
31 \r
32         //! creates a surface from the file\r
33         IImage* loadImage(io::IReadFile* file) const override;\r
34 };\r
35 \r
36 \r
37 } // end namespace video\r
38 } // end namespace irr\r
39 \r
40 #endif\r