PixelLightAPI  .
ImageLoaderBMP.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: ImageLoaderBMP.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_BMP_H__
00024 #define __PLGRAPHICS_IMAGELOADER_BMP_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 BMP file formats
00052 *
00053 *  @note
00054 *    - BMP specifications: http://en.wikipedia.org/wiki/BMP_file_format
00055 *    - The BGR(A) color format of BMP is automatically converted to RGB(A)
00056 */
00057 class ImageLoaderBMP : public ImageLoader {
00058 
00059 
00060     //[-------------------------------------------------------]
00061     //[ RTTI interface                                        ]
00062     //[-------------------------------------------------------]
00063     pl_class(PLGRAPHICS_RTTI_EXPORT, ImageLoaderBMP, "PLGraphics", PLGraphics::ImageLoader, "Image loader implementation for BMP file formats")
00064         // Properties
00065         pl_properties
00066             pl_property("Formats",  "bmp,BMP")
00067             pl_property("Load",     "1")
00068             pl_property("Save",     "1")
00069         pl_properties_end
00070         // Constructors
00071         pl_constructor_0(DefaultConstructor,    "Default constructor",  "")
00072         // Methods
00073         pl_method_2(Load,   pl_ret_type(bool),  Image&,         PLCore::File&,  "Load method",  "")
00074         pl_method_2(Save,   pl_ret_type(bool),  const Image&,   PLCore::File&,  "Save method",  "")
00075     pl_class_end
00076 
00077 
00078     //[-------------------------------------------------------]
00079     //[ Public RTTI methods                                   ]
00080     //[-------------------------------------------------------]
00081     public:
00082         PLGRAPHICS_API bool Load(Image &cImage, PLCore::File &cFile);
00083         PLGRAPHICS_API bool Save(const Image &cImage, PLCore::File &cFile);
00084 
00085 
00086     //[-------------------------------------------------------]
00087     //[ Public functions                                      ]
00088     //[-------------------------------------------------------]
00089     public:
00090         /**
00091         *  @brief
00092         *    Default constructor
00093         */
00094         PLGRAPHICS_API ImageLoaderBMP();
00095 
00096         /**
00097         *  @brief
00098         *    Destructor
00099         */
00100         PLGRAPHICS_API virtual ~ImageLoaderBMP();
00101 
00102 
00103 };
00104 
00105 
00106 //[-------------------------------------------------------]
00107 //[ Namespace                                             ]
00108 //[-------------------------------------------------------]
00109 } // PLGraphics
00110 
00111 
00112 #endif // __PLGRAPHICS_IMAGELOADER_BMP_H__


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:08:56
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported