开发者

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);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜