CImg src(\"image.jpg\"); int width = src.width(); int height = src.height(); unsigned char* ptr = src.data(10,10);
How can I
@wamp: I don't know about CImg but grayscale images in RGB have:
R = G = B
and in CMYK:
C = M = Y = 0
K = luminance
So you don't even need a function for that...