QImage
will load the image for you. BMP is one of the supported formats. You shouldn't care about the BMP standard used since Qt
handles it internally.
You can access the RGB value of any pixel using the pixel
method of QImage
.
QImage image;
image.load("myimage.bmp");
QVector<QRgb> imageRGBValues;
for (unsigned i=0; i<image.width(); ++i)
{
for (unsigned j=0; j<image.height(); ++j)
imageRGBValues.push_back(image.pixel(i,j));
}