PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: ImageLoaderPNG.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLGRAPHICS_IMAGELOADER_PNG_H__ 00024 #define __PLGRAPHICS_IMAGELOADER_PNG_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLGraphics/Image/ImageLoader.h" 00032 00033 00034 //[-------------------------------------------------------] 00035 //[ Namespace ] 00036 //[-------------------------------------------------------] 00037 namespace PLGraphics { 00038 00039 00040 //[-------------------------------------------------------] 00041 //[ Forward declarations ] 00042 //[-------------------------------------------------------] 00043 class Image; 00044 00045 00046 //[-------------------------------------------------------] 00047 //[ Classes ] 00048 //[-------------------------------------------------------] 00049 /** 00050 * @brief 00051 * Image loader implementation for PNG file formats 00052 * 00053 * @note 00054 * - Using libpng (http://www.libpng.org) 00055 */ 00056 class ImageLoaderPNG : public ImageLoader { 00057 00058 00059 //[-------------------------------------------------------] 00060 //[ RTTI interface ] 00061 //[-------------------------------------------------------] 00062 pl_class(PLGRAPHICS_RTTI_EXPORT, ImageLoaderPNG, "PLGraphics", PLGraphics::ImageLoader, "Image loader implementation for PNG file formats") 00063 // Properties 00064 pl_properties 00065 pl_property("Formats", "png,PNG") 00066 pl_property("Load", "1") 00067 pl_property("Save", "1") 00068 pl_properties_end 00069 // Constructors 00070 pl_constructor_0(DefaultConstructor, "Default constructor", "") 00071 // Methods 00072 pl_method_2(Load, pl_ret_type(bool), Image&, PLCore::File&, "Load method", "") 00073 pl_method_2(Save, pl_ret_type(bool), const Image&, PLCore::File&, "Save method", "") 00074 pl_class_end 00075 00076 00077 //[-------------------------------------------------------] 00078 //[ Public RTTI methods ] 00079 //[-------------------------------------------------------] 00080 public: 00081 PLGRAPHICS_API bool Load(Image &cImage, PLCore::File &cFile); 00082 PLGRAPHICS_API bool Save(const Image &cImage, PLCore::File &cFile); 00083 00084 00085 //[-------------------------------------------------------] 00086 //[ Public functions ] 00087 //[-------------------------------------------------------] 00088 public: 00089 /** 00090 * @brief 00091 * Default constructor 00092 */ 00093 PLGRAPHICS_API ImageLoaderPNG(); 00094 00095 /** 00096 * @brief 00097 * Destructor 00098 */ 00099 PLGRAPHICS_API virtual ~ImageLoaderPNG(); 00100 00101 00102 }; 00103 00104 00105 //[-------------------------------------------------------] 00106 //[ Namespace ] 00107 //[-------------------------------------------------------] 00108 } // PLGraphics 00109 00110 00111 #endif // __PLGRAPHICS_IMAGELOADER_PNG_H__
|