| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
1 |
#pragma once |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
2 |
|
| 80a9926d |
Poul Sander |
2026-05-19 20:28 |
3 |
#include <QByteArray> |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
4 |
#include <QString> |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
5 |
#include <QList> |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
6 |
#include <QPair> |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
7 |
|
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
8 |
struct ExifData { |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
9 |
QString captionAbstract; // IPTC Caption-Abstract (Iptc.Application2.Caption) |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
10 |
QString description; // Exif.Image.ImageDescription |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
11 |
QString dateTime; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
12 |
QString make; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
13 |
QString model; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
14 |
QString exposureTime; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
15 |
QString fNumber; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
16 |
QString iso; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
17 |
QString focalLength; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
18 |
QString flash; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
19 |
QString dimensions; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
20 |
QString fileSize; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
21 |
|
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
22 |
bool isEmpty() const; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
23 |
QList<QPair<QString, QString>> toList() const; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
24 |
}; |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
25 |
|
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
26 |
namespace ExifReader { |
| 80a9926d |
Poul Sander |
2026-05-19 20:28 |
27 |
ExifData read(const QByteArray &path); |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
28 |
|
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
29 |
// Write caption to IPTC Caption-Abstract. |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
30 |
// If oldData.captionAbstract == oldData.description they were in sync; |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
31 |
// in that case also update Exif.Image.ImageDescription to match. |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
32 |
// Returns true on success. |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
33 |
bool saveCaption(const QByteArray &path, |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
34 |
const QString &caption, |
| beb4a823 |
Poul Sander |
2026-05-19 21:53 |
35 |
const ExifData &oldData); |
| 53fdab93 |
Poul Sander |
2026-05-18 18:45 |
36 |
} // namespace ExifReader |
|
|
1970-01-01 00:00 |
37 |
|