Hi everybody!
i want to modify a image and crop that! what is best solution that i can use and is fast?
i think i must use QPainter but i dont know how to draw region of crop with Darg and drop or mousemove event!
thanks a lot.
Hi everybody!
i want to modify a image and crop that! what is best solution that i can use and is fast?
i think i must use QPainter but i dont know how to draw region of crop with Darg and drop or mousemove event!
thanks a lot.
Use QLabel to show a image. Implement a QRubberBand over the label. Then get the rect of rubber band , translate to image cordinates and crop the image using QImage::scaled.
Then set the scaled image on the label.
Hope this helps...
danics (10th March 2010)
If you are working with a QImage : http://doc.qt.io/qt-4.8/QImage::copy(QRect)
Last edited by toutarrive; 10th March 2010 at 09:29.
Bookmarks