我需要将原始数据(bgra5551)读入QImage并显示它并将QImage写回原始数据(bgra5551),Qt仅支持Format_RGB555,是否有任何方式使Format_RGB555
透明(alpha通道255) ?
我厌倦了这个:
QImage getImage(uchar* data, int width, int height){
return QImage(data, width, height, QImage::Format_RGB555).copy();
}
uchar* getData(QImage img){
return img.bits();
}
QImage imgRGB555 = getImage(bgra5551, width, height);
// problem1: imgRGB555 is not transparent.
uchar* org = getData(imgRGB555);
// problem2: bgra5551 != org