why Photoshop change GPS exif format?

Started by tszabon, June 17, 2020, 01:38:58 PM

Previous topic - Next topic

tszabon

I am using a Photoshop script which reads GPS data from jpeg file and put it into text layer. Photoshop presents GPS information like that: dd.dd mm.mm ss.ss (eg. 53.00 15.00' 30.19''). This is quite strange format, there is no point to show decimal part of degrees and minutes so I've splited original string and take only first 2 numbers od degree and minutes into text layer. My format of above coordinates looks like that: 53d15'30.19". And here is the problem: This method usually works only with a jpeg file which is opened in Photoshop for the first time. When the jpeg file is closed - even without saving any changes on the exit, the format of GPS data changes. Photoshop move seconds part of coordinate to minutes section, so now the same coordinate looks like that: 53.00 15.50' 00.00". 30.19" was moved to minutes and now is presented as 15.50' the fraction part of seconds is lost.  This operation reduces precision from 0.3m (0.01 part of second is equal to approx. 0.3m on the ground) to 18.5m (0.01 part of minute).  Why this happends, why Photoshop changes GPS data even without saving any changes to the file? I know this is not a forum about Photoshop but the issue relate to exif format of latitude and longitude stored in exif file.

Phil Harvey

In EXIF, GPS lat/lon are stored as 3 64-bit rational values (32-bit numerator plus a 32-bit denominator).  Photoshop probably converts the coordinates to its preferred internal representation when reading, and when writing it uses its preferred format.  ExifTool does the same when you copy coordinates from one file to another.  Exiftool uses a double-precision floating point internally, and converts back to DDD MM SS.SSSSSSSS for highest precision when writing.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

tszabon

Thank you for your reply. That's what I've noticed when I was experimenting with different Pyton modules. When I was updating GPS coordinate for eg. to ((53,1),(13,1),(1341,100)) Photoshop moves the value from the last brackets representing seconds to the middle minutes part, leaving 3rd bracket value as (0,1). It's really annoying that user has absolutely no control over that. :(

Phil Harvey

Try submitting a bug report to Adobe.  It won't get fixed unless someone does this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).