问题描述
在我的Qt应用程序中,我想读取图像的exif数据. QImage
或QPixmap
似乎没有提供此类挂钩.
In my Qt app I want to read exif data of images. QImage
or QPixmap
don't seem to provide such hooks.
Qt中是否有任何API允许在不使用libexif
之类的外部库的情况下读取exif?
Is there any API in Qt that allows reading exif without using external libraries like libexif
?
这是
推荐答案
QImageReader有一个名为transformation()的方法,该方法在5.5版中引入,首先应该尝试一下.
QImageReader has a method named transformation() which is introduced in version 5.5, first you should try that.
您还可以检查以下链接,以了解如何在Qt中使用Windows GDI完成此操作, http://amin-ahmadi.com/2015/12/17/how-to-read-image-orientation-in-qt-using -stored-exif/
You can also check the following link to see how it's done using Windows GDI in Qt, http://amin-ahmadi.com/2015/12/17/how-to-read-image-orientation-in-qt-using-stored-exif/
这篇关于在Qt中读取图像的EXIF元数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!