GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
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 Mon May 31 2021 05:21:31 for GRASS GIS 7 Programmer's Manual by
1.8.13