summaryrefslogtreecommitdiff
path: root/src/android/jpeg/exif.h
diff options
context:
space:
mode:
authorPaul Elder <paul.elder@ideasonboard.com>2021-03-08 18:52:44 +0900
committerPaul Elder <paul.elder@ideasonboard.com>2021-03-10 12:30:23 +0900
commitfd3faf7b601272c5d6ca8fc66b14d0fe13f56789 (patch)
tree3dc0acbc2e67c98d70b23f8d2eea74bb907f6004 /src/android/jpeg/exif.h
parenteb5a9d822fd2f0d890665cba6020b5a25710877e (diff)
android: jpeg: exif: Fix and expand setRational
setRational was not working properly for EXIF tags in the GPS IFD due to libexif not supporting those tags in exif_entry_initialize(). Manually specify the size of the EXIF entry to fix this. While at it, add support for setting multiple rationals, as that is a common use case for rational EXIF tags. As Rational types are no longer initialized by libexif directly, the EXIF_TAG_{X,Y}_RESOLUTION exif tags will not have their default values populated. This allows the GPS altitude to be set properly, and is part of the fix to allow the following CTS test to pass: - android.hardware.cts.CameraTest#testJpegExif Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/jpeg/exif.h')
-rw-r--r--src/android/jpeg/exif.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/android/jpeg/exif.h b/src/android/jpeg/exif.h
index b0d61402..8aa1b123 100644
--- a/src/android/jpeg/exif.h
+++ b/src/android/jpeg/exif.h
@@ -89,6 +89,8 @@ private:
const std::string &item,
StringEncoding encoding = NoEncoding);
void setRational(ExifIfd ifd, ExifTag tag, ExifRational item);
+ void setRational(ExifIfd ifd, ExifTag tag,
+ libcamera::Span<const ExifRational> items);
std::tuple<int, int, int> degreesToDMS(double decimalDegrees);
void setGPSDMS(ExifIfd ifd, ExifTag tag, int deg, int min, int sec);