GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
rgbpack.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RED_MASK   0x000000FF
 
#define GRN_MASK   0x0000FF00
 
#define BLU_MASK   0x00FF0000
 
#define INT_TO_RED(i, r)   (r = (i & RED_MASK))
 
#define INT_TO_GRN(i, g)   (g = (i & GRN_MASK) >> 8)
 
#define INT_TO_BLU(i, b)   (b = (i & BLU_MASK) >> 16)
 
#define RGB_TO_INT(r, g, b, i)
 
#define CONST_COLS   45
 
#define COLUMNS   9
 

Macro Definition Documentation

◆ BLU_MASK

#define BLU_MASK   0x00FF0000

Definition at line 6 of file rgbpack.h.

◆ COLUMNS

#define COLUMNS   9

Definition at line 17 of file rgbpack.h.

◆ CONST_COLS

#define CONST_COLS   45

Definition at line 16 of file rgbpack.h.

◆ GRN_MASK

#define GRN_MASK   0x0000FF00

Definition at line 5 of file rgbpack.h.

◆ INT_TO_BLU

#define INT_TO_BLU (   i,
  b 
)    (b = (i & BLU_MASK) >> 16)

Definition at line 10 of file rgbpack.h.

◆ INT_TO_GRN

#define INT_TO_GRN (   i,
  g 
)    (g = (i & GRN_MASK) >> 8)

Definition at line 9 of file rgbpack.h.

◆ INT_TO_RED

#define INT_TO_RED (   i,
  r 
)    (r = (i & RED_MASK))

Definition at line 8 of file rgbpack.h.

◆ RED_MASK

#define RED_MASK   0x000000FF

Definition at line 4 of file rgbpack.h.

◆ RGB_TO_INT

#define RGB_TO_INT (   r,
  g,
  b,
 
)
Value:
(i = (((r) & RED_MASK) + ((int)((g) << 8) & GRN_MASK) + \
((int)((b) << 16) & BLU_MASK)))
float g
Definition: named_colr.c:7
double b
Definition: r_raster.c:39
double r
Definition: r_raster.c:39
#define RED_MASK
Definition: rgbpack.h:4
#define BLU_MASK
Definition: rgbpack.h:6
#define GRN_MASK
Definition: rgbpack.h:5

Definition at line 12 of file rgbpack.h.