summaryrefslogtreecommitdiff
path: root/src/android/jpeg/exif.h
diff options
context:
space:
mode:
authorUmang Jain <email@uajain.com>2020-10-28 02:54:47 +0530
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-10-28 15:52:51 +0000
commitb053384ffab467ed016019bbcf8121a6f9e48fed (patch)
treea2e1910dcdf2bd9fd6d24c21325971842d38916d /src/android/jpeg/exif.h
parentf0421988dc7d91fbd221e2282f839cb51e1a3f8c (diff)
android: jpeg: post_processor_jpeg: Embed thumbnail into Exif metadata
Embed a Jpeg-encoded thumbnail into Exif metadata using the Thumbnailer class that got introduced. Introduce a helper function in Exif class for setting the thumbnail data. Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> [Kieran: Add todo comment, and Compression enum] Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/android/jpeg/exif.h')
-rw-r--r--src/android/jpeg/exif.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/android/jpeg/exif.h b/src/android/jpeg/exif.h
index 12c27b6f..5cab4559 100644
--- a/src/android/jpeg/exif.h
+++ b/src/android/jpeg/exif.h
@@ -21,11 +21,18 @@ public:
Exif();
~Exif();
+ enum Compression {
+ None = 1,
+ JPEG = 6,
+ };
+
void setMake(const std::string &make);
void setModel(const std::string &model);
void setOrientation(int orientation);
void setSize(const libcamera::Size &size);
+ void setThumbnail(libcamera::Span<const unsigned char> thumbnail,
+ Compression compression);
void setTimestamp(time_t timestamp);
libcamera::Span<const uint8_t> data() const { return { exifData_, size_ }; }