Get raw data from QImage
问题 I have a QImage that I built from a pixmap something like the following: QPixmap fullPmap = topItem->pixmap(); fullPmap = fullPmap.copy(isec.toRect()); QImage chip = fullPmap.toImage(); This is basically intersecting with a rectangle on screen to crop the image to a chipped size. I now need to get the character array representing that data back from chip. How can I do this? I tried something like this: unsigned char * data = chip.bits(); And when I display "data" I get a completely distorted