The observation that your distorted image is diagonal makes me think that you have an "off-by-one" error when writing pixels into the pixmap. That is, the length of the line that you think is correct is actually shorter, so your image is being wrapped around the borders of the pixmap and gets successively offset with each line. So the error is likely in the initial determination of the size of the pixmap to be painted vs. the size of the label into which you are placing it. The wrapping effect is likely a mismatch between the size of the pixmap and the size of the label.
Bookmarks