[libcamera-devel] [PATCH 3/4] android: jpeg: exif: Fix setGPSLocation longitude
Paul Elder
paul.elder at ideasonboard.com
Mon Mar 8 11:13:55 CET 2021
There was a copy-paste error that caused the latitude to be set twice and
the longitude never. Fix this.
This is part of the fix that allows the following CTS test to pass:
- android.hardware.cts.CameraTest#testJpegExif
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
src/android/jpeg/exif.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp
index c8b2f072..5225d17f 100644
--- a/src/android/jpeg/exif.cpp
+++ b/src/android/jpeg/exif.cpp
@@ -392,7 +392,7 @@ void Exif::setGPSLocation(const double *coords)
std::tie<int, int, int>(deg, min, sec) = degreesToDMS(coords[1]);
setString(EXIF_IFD_GPS, static_cast<ExifTag>(EXIF_TAG_GPS_LONGITUDE_REF),
EXIF_FORMAT_ASCII, deg >= 0 ? "E" : "W");
- setGPSDMS(EXIF_IFD_GPS, static_cast<ExifTag>(EXIF_TAG_GPS_LATITUDE),
+ setGPSDMS(EXIF_IFD_GPS, static_cast<ExifTag>(EXIF_TAG_GPS_LONGITUDE),
std::abs(deg), min, sec);
setByte(EXIF_IFD_GPS, static_cast<ExifTag>(EXIF_TAG_GPS_ALTITUDE_REF),
--
2.27.0
More information about the libcamera-devel
mailing list