Page principale Liste des namespaces Hiérarchie des classes Liste par ordre alphabétique Liste des composants Liste des fichiers Membres des namespaces Composants Déclarations

# ExCImage.h

Aller à la documentation de ce fichier.

    00001  /*
    00002  * ExNihilo 3D Engine
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  *
    00018  * Please read AUTHORS file !!!
    00019  *
    00020  * $Id: ExCImage.h,v 1.2 2002/08/01 19:37:49 binny Exp $
    00021  *
    00022  */
    00023
    00024
    00025 //-----------------------------------------
    00026 //Lib for loading data from != image format
    00027 //-----------------------------------------
    00028 //Current format supported
    00029 //-----------------------------------------
    00030 // .Bmp
    00031 //-----------------------------------------
    00032 //Format to developpe
    00033 //-----------------------------------------
    00034 // .tga
    00035 // .jpg
    00036 // .rgb
    00037 // .raw
    00038 // .ppm
    00039 //-----------------------------------------
    00040
    00041
    00042 #ifndef __EXCIMAGE_H__
    00043 #define __EXCIMAGE_H__
    00044 //--------------------------------
    00045 // File to include
    00046 //--------------------------------
    00047 #include "ExDefine.h"
    00048 #include "ExMath.h"
    00049 //--------------------------------
    00050 // Define type
    00051 //--------------------------------
    00052 #define TGA_RGB          2              // Normal RGB file
    00053 #define TGA_A            3              // ALPHA file
    00054 #define TGA_RLE         10              // Run-Length Encoded (RLE) file
    00055
    00056 #ifdef UNIX_SRC
    00057 typedef unsigned int WORD;
    00058 #endif
    00059
    00060 //-------------------------------
    00061 struct tImage
    00062 {
    00063         int channels;                   // The channels in the image (3 = RGB : 4 = RGBA)
    00064         int sizeX;                              // The width of the image in pixels
    00065         int sizeY;                              // The height of the image in pixels
    00066         unsigned char *data;    // The image pixel data
    00067         unsigned int    type;   // RGB,RGBA...
    00068 };
    00069 //--------------------------------
    00070 bool LoadBMP(tImage *image,const char *strFileName);
    00071 bool LoadTGA(tImage *image,const char *strFileName);
    00072 bool LoadJPG(tImage *image,const char *strFileName);
    00073
    00074 bool LoadBMP(tImage *image,std::string strFileName);
    00075 bool LoadTGA(tImage *image,std::string strFileName);
    00076 bool LoadJPG(tImage *image,std::string strFileName);
    00077
    00078 //void DecodeJPG(jpeg_decompress_struct* cinfo, tImage *pImageData);
    00079
    00080 #endif
    00081