PDA

View Full Version : Crop image



danics
10th March 2010, 08:42
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.

aamer4yu
10th March 2010, 09:08
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...

toutarrive
10th March 2010, 09:24
If you are working with a QImage : QImage::copy(QRect)