Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

ccvt_types.h

Go to the documentation of this file.
00001 /* CCVT: ColourConVerT: simple library for converting colourspaces 00002 Copyright (C) 2002 Nemosoft Unv. 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 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 For questions, remarks, patches, etc. for this program, the author can be 00019 reached at nemosoft@smcc.demon.nl. 00020 */ 00021 00022 #ifndef CCVT_TYPES_H 00023 #define CCVT_TYPES_H 00024 00025 #if defined (LITTLE_ENDIAN) 00026 00027 typedef struct 00028 { 00029 unsigned char b; 00030 unsigned char g; 00031 unsigned char r; 00032 unsigned char z; 00033 } PIXTYPE_bgr32; 00034 00035 typedef struct 00036 { 00037 unsigned char b; 00038 unsigned char g; 00039 unsigned char r; 00040 } PIXTYPE_bgr24; 00041 00042 typedef struct 00043 { 00044 unsigned char r; 00045 unsigned char g; 00046 unsigned char b; 00047 unsigned char z; 00048 } PIXTYPE_rgb32; 00049 00050 typedef struct 00051 { 00052 unsigned char r; 00053 unsigned char g; 00054 unsigned char b; 00055 } PIXTYPE_rgb24; 00056 00057 #elif defined (BIG_ENDIAN) 00058 00059 typedef struct 00060 { 00061 unsigned char z; 00062 unsigned char r; 00063 unsigned char g; 00064 unsigned char b; 00065 } PIXTYPE_bgr32; 00066 00067 typedef struct 00068 { 00069 unsigned char r; 00070 unsigned char g; 00071 unsigned char b; 00072 } PIXTYPE_bgr24; 00073 00074 typedef struct 00075 { 00076 unsigned char z; 00077 unsigned char b; 00078 unsigned char g; 00079 unsigned char r; 00080 } PIXTYPE_rgb32; 00081 00082 typedef struct 00083 { 00084 unsigned char b; 00085 unsigned char g; 00086 unsigned char r; 00087 } PIXTYPE_rgb24; 00088 00089 #else 00090 # error "Neither BIG_ENDIAN, nor LITTLE_ENDIAN???" 00091 #endif 00092 00093 #define SAT(c) \ 00094 if (c & (~255)) { if (c < 0) c = 0; else c = 255; } 00095 00096 00097 00098 #endif

Generated on Wed Dec 13 23:38:46 2006 for CamStream by doxygen 1.3.7