Read or write the thumbnail embedded in a JPEG image
I am new to Qt. I want to know how to read or write the thumbnail embedded in JPEG image using Qt classes.
I found that the “QMediaMetaData Namespace” contains the “ThumbnailImage” identifier containing the thumbnail data. But I didn’t get any examples related to that.
Please help me to find a solution.
I think using QExifImageHeader is the best solution.
Thanks for the reply.
It is not part of the Qt classes.
It is an external library.
I need to know , is it possible with any Qt Classes in Qt 5.4 ?
Because it is written in qt you can directly include QExifImageHeader in your project.
So you do not have to include a library. Just copy these two classes into your project folder an add it to your project.
I don't know any other possibility.
Ok , thanks
I will check it.
I am using the * QExifImageHeader* .
I can only set thumbnail for images with thumbnail already embedded in it. While I am setting the thumbnail , it replaces the existing one.
Can't set the thumbnail for an image which don't have a thumbnail embedded in it and when I am trying to set that , the file become corrupted .
is there any possible way to write thumbnail for images without an existing thumbnail using the QExifImageHeader class ?