Changeset View
Changeset View
Standalone View
Standalone View
lib/exiv2imageloader.h
Context not available. | |||||
37 | } | 37 | } | ||
---|---|---|---|---|---|
38 | 38 | | |||
39 | // Local | 39 | // Local | ||
40 | #include "orientation.h" | ||||
40 | 41 | | |||
41 | class QByteArray; | 42 | class QByteArray; | ||
43 | class QIODevice; | ||||
42 | class QString; | 44 | class QString; | ||
45 | class QImage; | ||||
46 | class QSize; | ||||
43 | 47 | | |||
44 | namespace Gwenview | 48 | namespace Gwenview | ||
45 | { | 49 | { | ||
Context not available. | |||||
57 | ~Exiv2ImageLoader(); | 61 | ~Exiv2ImageLoader(); | ||
58 | 62 | | |||
59 | bool load(const QString&); | 63 | bool load(const QString&); | ||
60 | bool load(const QByteArray&); | 64 | | ||
65 | /** | ||||
66 | * @warning: Exiv2 takes ownership of the bytearray passed in, so the caller must keep a reference to it | ||||
67 | * to avoid a use-after-free! | ||||
68 | */ | ||||
69 | bool loadFromData(const QByteArray&); | ||||
70 | | ||||
71 | bool save(const QString& file); | ||||
72 | bool save(QIODevice*); | ||||
73 | | ||||
61 | QString errorMessage() const; | 74 | QString errorMessage() const; | ||
62 | std::unique_ptr<Exiv2::Image> popImage(); | 75 | std::unique_ptr<Exiv2::Image> popImage(); | ||
63 | 76 | | |||
77 | Orientation orientation() const; | ||||
78 | void resetOrientation(); | ||||
79 | | ||||
80 | int dotsPerMeterX() const; | ||||
81 | int dotsPerMeterY() const; | ||||
82 | | ||||
83 | QSize size() const; | ||||
84 | | ||||
85 | QString comment() const; | ||||
86 | void setComment(const QString&); | ||||
87 | | ||||
88 | void transform(Orientation); | ||||
89 | | ||||
90 | QImage thumbnail() const; | ||||
91 | void setThumbnail(const QImage&); | ||||
92 | void setImage(const QImage& image); | ||||
93 | | ||||
94 | QByteArray interColorProfile() const; | ||||
95 | const Exiv2::Image* handle() const; | ||||
96 | | ||||
64 | private: | 97 | private: | ||
65 | Exiv2ImageLoaderPrivate* const d; | 98 | Exiv2ImageLoaderPrivate* const d; | ||
99 | | ||||
100 | | ||||
101 | int dotsPerMeter(const QString& keyName) const; | ||||
66 | }; | 102 | }; | ||
67 | 103 | | |||
68 | } // namespace | 104 | } // namespace | ||
Context not available. |