From the CImg documentation - section 6.13 on page 34 and section 8.1.4.16 on page 120 - it looks like it datacan take four arguments : x, y, z and c:
T* data(const unsigned int x, const unsigned int y = 0,
const unsigned int z = 0, const unsigned int c = 0)
... where it crefers to the color channel. I assume that if your image is really an RGB image, then using values โโof 0, 1, or 2 for cwill give you red, green, and blue components at that location x, y.
For instance:
unsigned char *r = src.data(10, 10, 0, 0);
unsigned char *g = src.data(10, 10, 0, 1);
unsigned char *b = src.data(10, 10, 0, 2);
(But this is just an assumption!)
Edit:
, CImg (), :
unsigned char r = src(10, 10, 0, 0);