Qt 6.11 is out! See what's new in the release
blog
Fetching RGB values of a pixel
General and Desktop
2
Posts
2
Posters
2.2k
Views
1
Watching
-
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