Fetching RGB values of a pixel
-
I am trying to fetch RGB values of a pixel using the following method
@QRgb nil=image.pixel(x,y);
QColor fin(nil);
int r,g,b;
r = v.red();
g = v.green();
b = v.blue(); @This is is giving out of range exception for the given pixel coordinates though they are valid. I am I doing it right ? Can some one tell the best way to fetch rgb values of a pixel if the above isn't.
Thanks