marc I did test the image with a couple of web based exif tools and they all read the data
Yes, I also tested it successfully. There is nothing wrong with the image itself, and the image data is also readable. The issue is specifically with the non-standard GPSLatitude
and GPSLongitude
values stored in this image. It's supposed to be an array (ref) and all PHP references on functions to extract coordinates (1, 2, 3, 4) always require them as an array.
I have studied the output from this image vs the standard array format to see if I can find any correlation:
["GPSLatitude"]=> "4590791/120000"
["GPSLatitude"]=>
array(3) {
[0]=>
string(3) "8/1"
[1]=>
string(4) "14/1"
[2]=>
string(8) "2016/100"
}
I'm no expert, but I can't see any correlation. Therefore, for now at least, I will simply need to ignore "GPS coordinates" when the app discovers non-standard values, so that it doesn't break the folder JSON response.
PS! If you wanted to see the EXIF values yourself from this image, you can use the below.
<?php
$exif = exif_read_data('./BCN-20250326-CASILLA-02.jpg');
echo '<pre>' . var_export($exif, true) . '</pre>';
Result:
array (
'FileName' => 'BCN-20250326-CASILLA-02.jpg',
'FileDateTime' => 1743731003,
'FileSize' => 965324,
'FileType' => 2,
'MimeType' => 'image/jpeg',
'SectionsFound' => 'ANY_TAG, IFD0, EXIF, GPS',
'COMPUTED' =>
array (
'html' => 'width="1902" height="1969"',
'Height' => 1969,
'Width' => 1902,
'IsColor' => 1,
'ByteOrderMotorola' => 0,
'ApertureFNumber' => 'f/1.8',
),
'Make' => 'Apple',
'Model' => 'iPhone 11',
'Software' => 'PhotoShelter https://www.photoshelter.com',
'Exif_IFD_Pointer' => 132,
'GPS_IFD_Pointer' => 426,
'ExposureTime' => '1/60',
'FNumber' => '9/5',
'ExposureProgram' => 2,
'ISOSpeedRatings' => 250,
'ExifVersion' => '0232',
'DateTimeOriginal' => '2025:03:26 23:53:05',
'DateTimeDigitized' => '2025:03:26 19:53:05',
'ShutterSpeedValue' => '29212/4945',
'ApertureValue' => '54823/32325',
'BrightnessValue' => '43254/23905',
'ExposureBiasValue' => '0/1',
'MeteringMode' => 5,
'Flash' => 16,
'FocalLength' => '17/4',
'WhiteBalance' => 0,
'FocalLengthIn35mmFilm' => 25,
'GPSLatitudeRef' => 'N',
'GPSLatitude' => '4590791/120000',
'GPSLongitudeRef' => 'W',
'GPSLongitude' => '3412831515/27957598',
)