How do you add annotations to an image in Qt?
Does Qt support textual annotations of images as part of开发者_如何学运维 its object library?
if you want to write text on the image, QImage
is a child class of QPaintDevice
initialising a QPainter
with your image lets you draw on top of the image with any of the functions QPainter
offers including drawText()
Are you talking about Exif data? Qt does not support it. You can only add a "comment" tag to images. Look at QImageWriter documentation (QImageWriter::setText)
QImage image("some/image.jpeg"); QImageWriter writer("images/outimage.png", "png"); writer.setText("Author", "John Smith"); writer.write(image);
精彩评论