//allocate buffer BYTE* pRgb32Buffer = new BYTE[width*height* 4]; //create paint device QImage img = QImage(pRgb32Buffer , width, height, getStride(width, pixelFormat), QImage::Format_RGB32); //do some drawing on image (works!) QPainter painter(&img); painter.drawText(10, 50, QString("some text")); //mirrore image (doesn't mirror the orignal buffer!!!) img = img.mirrored(false,true); //doesn't work either //QImage mirrored = img.mirrored(); //img = mirrored; //mirrored.detach();
C++ (Qt)memmove(pRgb32Buffer, img.mirrored().bits(), width * height * 4);