MCPcopy Create free account
hub / github.com/blizzard4591/openMittsu / embedCaptionIntoImage

Method embedCaptionIntoImage

src/dataproviders/SimpleMessageCenter.cpp:1271–1282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1269 }
1270
1271 void SimpleMessageCenter::embedCaptionIntoImage(QByteArray& image, QString const& caption) const {
1272 if (!caption.isEmpty()) {
1273 QBuffer buffer(&image);
1274 buffer.open(QIODevice::ReadWrite);
1275
1276 QExifImageHeader header;
1277 header.setValue(QExifImageHeader::UserComment, QExifValue(caption));
1278 buffer.seek(0);
1279 header.saveToJpeg(&buffer);
1280 buffer.close();
1281 }
1282 }
1283
1284 void SimpleMessageCenter::openTabForIncomingMessage(openmittsu::protocol::ContactId const& contact) {
1285 emit newUnreadMessageAvailableContact(contact);

Callers

nothing calls this directly

Calls 4

isEmptyMethod · 0.80
setValueMethod · 0.80
saveToJpegMethod · 0.80
seekMethod · 0.45

Tested by

no test coverage detected