GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
rgbpack.h
Go to the documentation of this file.
1
#ifndef _RGBPACK_H
2
#define _RGBPACK_H
3
4
#define RED_MASK 0x000000FF
5
#define GRN_MASK 0x0000FF00
6
#define BLU_MASK 0x00FF0000
7
8
#define INT_TO_RED(i, r) (r = (i & RED_MASK))
9
#define INT_TO_GRN(i, g) (g = (i & GRN_MASK) >> 8)
10
#define INT_TO_BLU(i, b) (b = (i & BLU_MASK) >> 16)
11
12
#define RGB_TO_INT(r,g,b,i) (i = (((r) & RED_MASK) + \
13
((int)((g) << 8) & GRN_MASK) + \
14
((int)((b) << 16) & BLU_MASK)))
15
16
#define CONST_COLS 45
17
#define COLUMNS 9
18
19
#endif
/* _RGBPACK_H */
lib
ogsf
rgbpack.h
Generated on Sat Jan 2 2016 01:46:49 for GRASS Programmer's Manual by
1.8.5