Go to the documentation of this file.
9 #ifndef IMAGEMETADATA_H
10 #define IMAGEMETADATA_H
15 #include <QCoreApplication>
17 #include <QStringBuilder>
18 #include <QStringList>
67 : m_current(composite / 10), m_file(composite % 10) {}
71 int Composite()
const {
return m_current * 10 + m_file; }
73 int GetCurrent(
bool compensate);
74 QString Description()
const;
76 static int FromRotation(
const QString °rees);
79 static QString AsText(
int orientation);
81 int Apply(
int transform)
const;
83 using Matrix = QHash<int, QHash<int, int> >;
89 static Matrix InitOrientationMatrix();
112 static QString
ToString(
const QString &name,
const QString &label,
const QString &value)
113 {
return name % kSeparator % label % kSeparator % value; }
117 {
return str.split(kSeparator); }
119 using TagMap = QMultiMap<QString, QStringList>;
120 static TagMap ToMap(
const QStringList &tags);
122 virtual bool IsValid() = 0;
123 virtual QStringList GetAllTags() = 0;
124 virtual int GetOrientation(
bool *exists =
nullptr) = 0;
125 virtual QDateTime GetOriginalDateTime(
bool *exists =
nullptr) = 0;
126 virtual QString GetComment(
bool *exists =
nullptr) = 0;
130 : m_filePath(
std::move(filePath)) {}
137 #endif // IMAGEMETADATA_H
Orientation(int current, int file)
QHash< int, QHash< int, int > > Matrix
int m_current
The orientation to use: the file orientation with user transformations applied.
static void Transform(SIMI *Simi, F_PT xo, F_PT yo, F_PT *x, F_PT *y)
Orientation(int composite)
int m_file
The orientation of the raw file image, as specified by the camera.
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
int Composite() const
Encode original & current orientation to a single Db field.
static const Matrix kQt541_orientation
Orientation conversions for proper display on Qt 5.4.1.
static const bool krunningQt541
True when using Qt 5.4.1 with its deviant orientation behaviour.
Encapsulates Exif orientation processing.