I want to convert a QImage of format RGB888 to ARGB32 & fetch pixel data as unsigned int*.
I can do the following to convert to ARGB32
QImage new = old.convertToFormat(QImage::Format_ARGB32);
However, are the pixels stored signed or unsigned?
EDIT:
I need a pointer unsigned int* data, such that,
an unsigned int (32 bits) holds a pixel in ARGB format, which from left to right is as follows:
- the first 8 bits are for the alpha channel (and are ignored)
- the next 8 bits are for the red channel
- the next 8 bits are for the green channel
- the last 8 bits are for the blue channel
How do I do this?