From a3c9718cfcefbf5601b54ff1609cdc400c482744 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Mon, 8 Mar 2021 19:00:29 +0900 Subject: android: jpeg: exif: Fix setGPSLocation longitude 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 Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/android/jpeg/exif.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/android/jpeg') diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp index 470a2ac6..bd359f98 100644 --- a/src/android/jpeg/exif.cpp +++ b/src/android/jpeg/exif.cpp @@ -393,7 +393,7 @@ void Exif::setGPSLocation(const double *coords) std::tie(deg, min, sec) = degreesToDMS(coords[1]); setString(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_LONGITUDE_REF), EXIF_FORMAT_ASCII, deg >= 0 ? "E" : "W"); - setGPSDMS(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_LATITUDE), + setGPSDMS(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_LONGITUDE), std::abs(deg), min, sec); setByte(EXIF_IFD_GPS, static_cast(EXIF_TAG_GPS_ALTITUDE_REF), -- cgit v1.2.1