mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 18:29:17 +00:00
Fix: Exif parsers should accept longtitude up to 180 degrees (#1260)
This commit is contained in:
@@ -144,10 +144,10 @@ func (p internalExifParser) ParseExif(mediaPath string) (returnExif *models.Medi
|
||||
|
||||
lat, long, err := exifTags.LatLong()
|
||||
if err == nil {
|
||||
if math.Abs(lat) > 90 || math.Abs(long) > 90 {
|
||||
if math.Abs(lat) > 90 || math.Abs(long) > 180 {
|
||||
returnExif = &newExif
|
||||
log.Printf(
|
||||
"Incorrect GPS data in the %s Exif data: %f, %f, while expected values between '-90' and '90'. Ignoring GPS data.",
|
||||
"Incorrect GPS data in the %s Exif data: %f, %f, while expected latitude between '-90' and '90', and longitude between '-180' and '180'. Ignoring GPS data.",
|
||||
mediaPath, long, lat)
|
||||
return
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user