I have an 8 bit bitmap image that I need to read, retrieve the data and use that information as the alpha channel for another image. How do I go about doing that? I have tried the below code, but doesn't seem to work.
@ QImage alpha("C:/images/alpha.bmp");//8 bit bmp
// This detects and shows 3, which is QImage::Format_Indexed8. Fine so far. qDebug()<<"alpha image format " <<alpha.format(); QColor cola = QColor::fromRgba(alpha.pixel(j,y)); img2.setPixel(j,y,qRgba(red,gren,blue,cola.alpha()));@
Any suggestions on how to retrieve the 8 bit info from the bitmap?