Recommend this page to a friend! |
phpExifRW | > | All threads | > | no longitude tags appearing | > | (Un) Subscribe thread alerts |
|
Phil Evans - 2005-06-11 02:41:08
following is the full print out:
Array ( [resolutionUnit] => Inches [FileName] => 07140001.jpg [FileSize] => 504276 bytes [FileDateTime] => 11-Jun-2005 12:34:20 [FlashUsed] => 0 [make] => Canon [model] => Canon PowerShot A70 [xResolution] => 180.00 (180/1) Inches [yResolution] => 180.00 (180/1) Inches [fileModifiedDate] => 2004:07:14 10:39:32 [YCbCrPositioning] => 1 [exposureTime] => 0.004 s (1/250) (1/250) [fnumber] => f/2.8 [exifVersion] => 0220 [DateTime] => 2004:07:14 10:39:32 [dateTimeDigitized] => 2004:07:14 10:39:32 [componentConfig] => Does Not Exists [jpegQuality] => Basic [aperture] => 2.7979593450766 [exposureBias] => 0.00 (0/3) [meteringMode] => matrix [flashUsed] => No [focalLength] => 5.41 (173/32) [makerNote] => NOT IMPLEMENTED [exifComment] => ASCIIMontane Grassy Woodland near start of Sam Jamieson Spur Track. [flashpixVersion] => 0100 [colorSpace] => [Width] => 1024 [Height] => 768 [GPSLatitudeRef] => Reserved [GPSLatitude] => Array ( [Degrees] => 48 [Minutes] => 49 [Seconds] => 48 ) [focalPlaneYResolution] => 4923.08 (768000/156) [sensing] => One-chip color area sensor [sourceType] => [customRendered] => Normal Process [exposureMode] => Auto Exposure [whiteBalance] => 0 [zoomRatio] => 1.00 (2048/2048) [screenCaptureType] => Standard [compressScheme] => JPEG compression (thumbnails only) [Thumbnail] => .cache_thumbs/07140001.jpg [ThumbnailSize] => 6212 bytes [CCDWidth] => 5.28mm [imageComment] => Montane Grassy Woodland near start of Sam Jamieson Spur Track [IsColor] => 1 [Process] => 192 [resolution] => 1024x768 [color] => Color [jpegProcess] => Baseline ) Read EXIF in 0.022079944610596 seconds Is there any work around for this? PhilE
Vinay Yadav - 2005-06-11 07:14:06 - In reply to message 1 from Phil Evans
Can you please send me the image containing GPS data at vinay@vinayras.com - i will analyse and reply back.
Bill Kilborn - 2007-03-25 20:43:13 - In reply to message 1 from Phil Evans
I have the same problem except no GPS data at all and the image does have the data. No latitude or longitude. Ref: http://journey2.net/map/gps/exampleReader.php
With the exception this is a great class. Bill Kilborn, Florida, USA
Vinay Yadav - 2007-03-27 12:54:40 - In reply to message 3 from Bill Kilborn
Try the latest updated class at
open.vinayras.com/files/exifReader- ...and please post your comments at: open.vinayras.com/phpexifrw_exif_re ...Vinay Yadav Web-Developer VinayRas Infotech http://open.vinayras.com
Bill Kilborn - 2007-03-27 16:50:26 - In reply to message 4 from Vinay Yadav
"No Page Available" at the address posted for the upgrade.
Dustin Runnells - 2010-05-07 21:20:56 - In reply to message 4 from Vinay Yadav
Vinay,
Thanks for the module! I too had the latitude/longitude problem (along with the gps version). Using the information from these two sites I came up with the below changes that have worked for my application: awaresystems.be/imaging/tiff/tiffta ...en.wikipedia.org/wiki/Geotagging The diff, sorry this is ugly: --- exifReader.inc 2008-09-24 19:02:27.000000000 -0400 +++ exifReader.inc.new 2010-05-07 17:09:00.000000000 -0400 @@ -124,6 +124,8 @@ /** * Exif IFD */ define("TAG_EXIF_OFFSET","0x8769"); +/** * GPS tag */ +define("TAG_GPS_OFFSET","0x8825"); /** * Interoperability tag */ define("TAG_INTEROP_OFFSET","0xa005"); /** * Image input equipment manufacturer */ @@ -217,6 +219,7 @@ define("TAG_COLOR_SPACE","0xA001"); //ColorSpace define("TAG_RELATED_SOUND_FILE","0xA004"); //Related audio file +define("TAG_GPS_VERSION_ID","0x0000"); // define("TAG_GPS_LATITUDE_REF","0x0001"); // define("TAG_GPS_LATITUDE","0x0002"); // @@ -1035,6 +1038,13 @@ case TAG_RELATED_SOUND_FILE: $this->ImageInfo['h']["relatedSoundFile"] = $this->string_format(substr($ValuePtr,0,$ByteCount)); break; + case TAG_GPS_VERSION_ID: + if ($ByteCount == 4) { + $this->ImageInfo['h']["GPSVersionID"] = ord(substr($ValuePtr,0,1)) . ' ' + . ord(substr($ValuePtr,1,1)) . ' ' + . ord(substr($ValuePtr,2,1)) . ' ' + . ord(substr($ValuePtr,3,1)); + } case TAG_GPS_LATITUDE_REF: $this->ImageInfo['h']["GPSLatitudeRef"] = $this->string_format(substr($ValuePtr,0,$ByteCount)); $this->ImageInfo['h']["GPSLatitudeRef"] = trim($this->ImageInfo['h']["GPSLatitudeRef"]); @@ -1048,20 +1058,37 @@ } break; case TAG_GPS_LATITUDE: - $tmp = substr($ValuePtr,0,$ByteCount); - - $this->ImageInfo['h']["GPSLatitude"]["Degrees"] = ord(substr($tmp,0,1)); - $this->ImageInfo['h']["GPSLatitude"]["Minutes"] = ord(substr($tmp,1,1)); - $this->ImageInfo['h']["GPSLatitude"]["Seconds"] = ord(substr($tmp,2,1)); + if ($ByteCount == 24) { + $degNum = $this->Get32s($ValuePtr[0],$ValuePtr[1],$ValuePtr[2],$ValuePtr[3]); + $degDen = $this->Get32s($ValuePtr[4],$ValuePtr[5],$ValuePtr[6],$ValuePtr[7]); + $minNum = $this->Get32s($ValuePtr[8],$ValuePtr[9],$ValuePtr[10],$ValuePtr[11]); + $minDen = $this->Get32s($ValuePtr[12],$ValuePtr[13],$ValuePtr[14],$ValuePtr[15]); + $secNum = $this->Get32s($ValuePtr[16],$ValuePtr[17],$ValuePtr[18],$ValuePtr[19]); + $secDen = $this->Get32s($ValuePtr[20],$ValuePtr[21],$ValuePtr[22],$ValuePtr[23]); + $deg = ($degNum/$degDen); + $min = ($minNum/$minDen); + $sec = ($secNum/$secDen); + $this->ImageInfo['h']["GPSLatitude"]["Degrees"] = $deg; + $this->ImageInfo['h']["GPSLatitude"]["Minutes"] = $min; + $this->ImageInfo['h']["GPSLatitude"]["Seconds"] = $sec; + } break; case TAG_GPS_LONGITUDE: - $tmp = substr($ValuePtr,0,$ByteCount); - - $this->ImageInfo['h']["GPSLongitude"]["Degrees"] = ord(substr($tmp,0,1)); - $this->ImageInfo['h']["GPSLongitude"]["Minutes"] = ord(substr($tmp,1,1)); - $this->ImageInfo['h']["GPSLongitude"]["Seconds"] = ord(substr($tmp,2,1)); - + if ($ByteCount == 24) { + $degNum = $this->Get32s($ValuePtr[0],$ValuePtr[1],$ValuePtr[2],$ValuePtr[3]); + $degDen = $this->Get32s($ValuePtr[4],$ValuePtr[5],$ValuePtr[6],$ValuePtr[7]); + $minNum = $this->Get32s($ValuePtr[8],$ValuePtr[9],$ValuePtr[10],$ValuePtr[11]); + $minDen = $this->Get32s($ValuePtr[12],$ValuePtr[13],$ValuePtr[14],$ValuePtr[15]); + $secNum = $this->Get32s($ValuePtr[16],$ValuePtr[17],$ValuePtr[18],$ValuePtr[19]); + $secDen = $this->Get32s($ValuePtr[20],$ValuePtr[21],$ValuePtr[22],$ValuePtr[23]); + $deg = ($degNum/$degDen); + $min = ($minNum/$minDen); + $sec = ($secNum/$secDen); + $this->ImageInfo['h']["GPSLongitude"]["Degrees"] = $deg; + $this->ImageInfo['h']["GPSLongitude"]["Minutes"] = $min; + $this->ImageInfo['h']["GPSLongitude"]["Seconds"] = $sec; + } break; case TAG_GPS_LONGITUDE_REF: @@ -1319,6 +1346,13 @@ break; //--------------------------------------------- case TAG_EXIF_OFFSET: + case TAG_GPS_OFFSET: + { + + $SubdirStart = substr($OffsetBase,$this->Get32u($ValuePtr[0],$ValuePtr[1],$ValuePtr[2],$ValuePtr[3])); + $this->ProcessExifDir($SubdirStart, $OffsetBase, $ExifLength); + continue; + } case TAG_INTEROP_OFFSET: {
jerome - 2010-08-01 16:24:55 - In reply to message 6 from Dustin Runnells
Thanks for improving ! It's works well.
|
info at phpclasses dot org
.