Instrument Neutral Distributed Interface INDI  1.9.5
ccvt_types.h
Go to the documentation of this file.
1 /* CCVT: ColourConVerT: simple library for converting colourspaces
2  Copyright (C) 2002 Nemosoft Unv.
3  Email:athomas@nemsoft.co.uk
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 
19  For questions, remarks, patches, etc. for this program, the author can be
20  reached at nemosoft@smcc.demon.nl.
21 */
22 
23 #pragma once
24 
25 typedef struct
26 {
27  unsigned char b;
28  unsigned char g;
29  unsigned char r;
30  unsigned char z;
32 
33 typedef struct
34 {
35  unsigned char b;
36  unsigned char g;
37  unsigned char r;
39 
40 typedef struct
41 {
42  unsigned char r;
43  unsigned char g;
44  unsigned char b;
45  unsigned char z;
47 
48 typedef struct
49 {
50  unsigned char r;
51  unsigned char g;
52  unsigned char b;
54 
55 #define SAT(c) \
56  if (c & (~255)) \
57  { \
58  if (c < 0) \
59  c = 0; \
60  else \
61  c = 255; \
62  }
PIXTYPE_rgb32::z
unsigned char z
Definition: ccvt_types.h:45
PIXTYPE_bgr32::z
unsigned char z
Definition: ccvt_types.h:30
PIXTYPE_rgb24::b
unsigned char b
Definition: ccvt_types.h:52
PIXTYPE_rgb32::g
unsigned char g
Definition: ccvt_types.h:43
PIXTYPE_rgb24::r
unsigned char r
Definition: ccvt_types.h:50
PIXTYPE_bgr32::r
unsigned char r
Definition: ccvt_types.h:29
PIXTYPE_rgb32
Definition: ccvt_types.h:40
PIXTYPE_rgb24
Definition: ccvt_types.h:48
PIXTYPE_rgb32::r
unsigned char r
Definition: ccvt_types.h:42
PIXTYPE_rgb32::b
unsigned char b
Definition: ccvt_types.h:44
PIXTYPE_bgr24::r
unsigned char r
Definition: ccvt_types.h:37
PIXTYPE_bgr32::g
unsigned char g
Definition: ccvt_types.h:28
PIXTYPE_bgr32::b
unsigned char b
Definition: ccvt_types.h:27
PIXTYPE_bgr32
Definition: ccvt_types.h:25
PIXTYPE_bgr24
Definition: ccvt_types.h:33
PIXTYPE_bgr24::b
unsigned char b
Definition: ccvt_types.h:35
PIXTYPE_bgr24::g
unsigned char g
Definition: ccvt_types.h:36
PIXTYPE_rgb24::g
unsigned char g
Definition: ccvt_types.h:51