开发者

How do you add annotations to an image in Qt?

开发者 https://www.devze.com 2022-12-30 14:07 出处:网络
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 wit

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

精彩评论

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