ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: mhulse on July 26, 2017, 01:01:30 AM

Title: Lat/Lon not being red by Photoshop of Apple Photos
Post by: mhulse on July 26, 2017, 01:01:30 AM
Hello,

When I set my exif GPS using:

exiftool \
-overwrite_original \
-GPSLatitude=$lat \
-GPSLatitudeRef=$lat \
-GPSLongitude=$lon \
-GPSLongitudeRef=$lon \
$image


I get:

$ exiftool pano\[53.59735046416009\,142.9555201415484\].png
ExifTool Version Number         : 10.55
File Name                       : pano[53.59735046416009,142.9555201415484].png
Directory                       : .
File Size                       : 15 MB
File Modification Date/Time     : 2017:07:25 20:45:18-07:00
File Access Date/Time           : 2017:07:25 21:04:43-07:00
File Inode Change Date/Time     : 2017:07:25 20:45:18-07:00
File Permissions                : rw-r--r--
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 6656
Image Height                    : 3328
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Exif Byte Order                 : Big-endian (Motorola, MM)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Y Cb Cr Positioning             : Centered
GPS Version ID                  : 2.3.0.0
GPS Latitude Ref                : North
GPS Longitude Ref               : East
GPS Latitude                    : 53 deg 35' 50.46" N
GPS Longitude                   : 142 deg 57' 19.87" E
GPS Position                    : 53 deg 35' 50.46" N, 142 deg 57' 19.87" E
Image Size                      : 6656x3328
Megapixels                      : 22.2


But when I load that image in Apple Photos or Adobe Photoshop, the GPS data is not used/recognized. Here's a screen of Photoshops's image info window:

[attach=1][/attach] (how do I do attachments inline?)

When I add location data using Apple Photos, and save as a new image, here's the result:

$ exiftool pano\[53.59735046416009\,142.9555201415484\].jpg
ExifTool Version Number         : 10.55
File Name                       : pano[53.59735046416009,142.9555201415484].jpg
Directory                       : .
File Size                       : 140 kB
File Modification Date/Time     : 2017:07:25 21:06:11-07:00
File Access Date/Time           : 2017:07:25 21:07:21-07:00
File Inode Change Date/Time     : 2017:07:25 21:06:11-07:00
File Permissions                : rw-r--r--
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
Exif Byte Order                 : Big-endian (Motorola, MM)
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Software                        : Photos 2.0
Modify Date                     : 2017:07:25 20:45:18
Date/Time Original              : 2017:07:25 20:45:18
Create Date                     : 2017:07:25 20:45:18
Color Space                     : sRGB
Exif Image Width                : 1280
Exif Image Height               : 640
GPS Latitude Ref                : North
GPS Longitude Ref               : East
XMP Toolkit                     : XMP Core 5.4.0
Creator Tool                    : Photos 2.0
Date Created                    : 2017:07:25 20:45:18
Current IPTC Digest             : d41d8cd98f00b204e9800998ecf8427e
IPTC Digest                     : d41d8cd98f00b204e9800998ecf8427e
Image Width                     : 1280
Image Height                    : 640
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
GPS Latitude                    : 53 deg 35' 50.46" N
GPS Longitude                   : 142 deg 57' 19.87" E
GPS Position                    : 53 deg 35' 50.46" N, 142 deg 57' 19.87" E
Image Size                      : 1280x640
Megapixels                      : 0.819


Other than there being more fields, I don't see the difference in relation to the GPS data.

Is there a way for me to get Apple Photos and Adobe Photoshop to "see" my exiftool GPS-encoded data?

Do these GUIs read something other than exif? Maybe IPTC or embedded XMP?

Thank you in advance for the help!
Title: Re: Lat/Lon not being red by Photoshop of Apple Photos
Post by: Phil Harvey on July 26, 2017, 08:54:24 AM
In your output I can't see where the metadata is being written.

Try using the command suggested in FAQ 3 (https://exiftool.org/faq.html#Q3) to help figure this out.

- Phil
Title: Re: Lat/Lon not being red by Photoshop of Apple Photos
Post by: StarGeek on July 26, 2017, 05:13:14 PM
Given the command at the beginning, it's probably being written to EXIF, which in a PNG is probably not going to be supported by most programs.  PNG doesn't officially support EXIF data (yet?)  but Exiftool uses a workaround which is also supported by exiv2 and imagemagick, but not much else.

Switching to XMP GPS tags might work, but I wouldn't depend upon it.  Converting to Tiff might be a better option.  You won't lose any color data and gain full metadata support from almost all programs.

Try this for your command.  XMP GPS tags don't need the the Ref tags, as they support the direction within the base tag.
exiftool \
-overwrite_original \
-XMP:GPSLatitude=$lat \
-XMP:GPSLongitude=$lon \
$image

Title: Re: Lat/Lon not being red by Photoshop of Apple Photos
Post by: Phil Harvey on July 26, 2017, 09:16:19 PM
Quote from: StarGeek on July 26, 2017, 05:13:14 PM
PNG doesn't officially support EXIF data (yet?)  but Exiftool uses a workaround which is also supported by exiv2 and imagemagick, but not much else.

Actually, as of July 15, PNG officially supports EXIF (http://ftp-osl.osuosl.org/pub/libpng/documents/pngext-1.5.0.html), and ExifTool 10.59 (released July 7) writes this.  Before this, ExifTool wrote a proprietary EXIF used by ImageMagick, but ImageMagick will be using the new EXIF now.

However StarGeek is right, EXIF in PNG isn't going to be supported by most programs.

- Phil

Edit: Added exact date of official PNG EXIF publication and link to specification.
Title: Re: Lat/Lon not being red by Photoshop of Apple Photos
Post by: mhulse on July 26, 2017, 10:15:02 PM
Ahhhhhhh, it was the PNG format! Switching to JPG did the trick! :)

Thank you so much StarGeek and Phil Harvey for the help, I really appreciate it!