hakunami
hakunami

Reputation: 2441

How to save the pixels in area of the QGRaphicsItem?

Here is the thing, I have develop a manual Annotation Tool for annotating images, you know, use rectangles to mark parts of a human, head, torso, limbs, and store the information like width, height, center point, rotation. I use QT to develop this tiny tool, it's cool, but I face a problem. I want to save the pixels of the image which in a QGraphicsScene in the area of the rectangles (QGraphicsItems), so, I want to know how can I control the pixels of this area?

Thank you very much.

Upvotes: 0

Views: 256

Answers (1)

Stephen Chu
Stephen Chu

Reputation: 12832

You can render the rectangle area into a QPainter which can be a QImage: http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#render

Upvotes: 1

Related Questions