0

I have one Gray scale image, which I wants to read row by row and process( to find the median) I created one QImage by loading the file. Then I used scanline(x) to read the row. But I am getting some wrong values( hope values should be 0-256). Scanline() gets the RGBA values I think. How to use this method for gray scale. Or any other solution please

Thanks

Shibs
  • 1

1 Answers1

1

What do you mean wrong values? If you get RGBA(45, 45, 45, 255), that's gray. If you want a 0-255 value, then just read the red component only (for example).

laurent
  • 88,262
  • 77
  • 290
  • 428