davethomaspilot
24th August 2015, 22:16
QImageWriter has a method for adding text to an image file:
http://doc.qt.io/qt-4.8/qimagewriter.html#setText
And QImageReader has a method to read the text, given a key and another method to print all the key names:
http://doc.qt.io/qt-4.8/qimagereader.html#text
I've tried using QImageWriter::setText(const QString & key, const QString & text) both with a key string and using and empty string for the key. No error results, but when I use QImageReader to read the text I get and empty string. When I use QImageReader::textKeys() I get "()".
Do these work for writing/reading text to a jpeg file? I'm assuming the text goes in the file header?
If so, is there a "trick" to get it to work?
Thanks.
http://doc.qt.io/qt-4.8/qimagewriter.html#setText
And QImageReader has a method to read the text, given a key and another method to print all the key names:
http://doc.qt.io/qt-4.8/qimagereader.html#text
I've tried using QImageWriter::setText(const QString & key, const QString & text) both with a key string and using and empty string for the key. No error results, but when I use QImageReader to read the text I get and empty string. When I use QImageReader::textKeys() I get "()".
Do these work for writing/reading text to a jpeg file? I'm assuming the text goes in the file header?
If so, is there a "trick" to get it to work?
Thanks.