hello I want to display grayscale image using qt. my problem is when i have image i get pixel with
QRgb pixel=imagef->pixel(i,j);
int color= qGray(pixelfft);
then i apply some modifications then I return the pixel result to image which I want to display grayscale. I do that and this work with color images in my source
imagef->setPixel(i,j, qRgb(x,x,x));
but when i choose white and black image then i do my treatment and when i display it that dosen't work only with this
imagef->setPixel(i,j,qGray(qRgb(x,x,x)));
can i find how to display grayscale image with any type of image source? please help me.