PDA

View Full Version : Problem while Transforming a Qimage



Schreihals
29th March 2012, 15:49
Hi,

i want to translate a qimage, but no idea how to do it.

with the "transformed function" its not allowed, so i tried the follwoing:


QImage tmp = tmp.transformed(QImage::trueMatrix(translation, tmp.width(), tmp.height()));


so the documentation told me:

http://doc.qt.nokia.com/4.7-snapshot/qimage.html#trueMatrix


Returns the actual matrix used for transforming an image with the given width, height and matrix.

When transforming an image using the transformed() function, the transformation matrix is internally adjusted to compensate for unwanted translation, i.e. transformed() returns the smallest image containing all transformed points of the original image. This function returns the modified matrix, which maps points correctly from the original image into the new image.

hope somebody can help me..
wishes