remvee / exifr

EXIF Reader
https://remvee.github.io/exifr/
MIT License
489 stars 66 forks source link

Nexus One GPS location data considered "corrupt" by exif CLI utility #5

Closed Ulmo closed 14 years ago

Ulmo commented 14 years ago

$ exif -d /n1/dcim/Camera/2010-03-17\ 08.44.25.jpg ExifLoader: Scanning 1024 byte(s) of data... ExifData: Parsing 44753 byte(s) EXIF data...

ExifData: Found EXIF header. ExifData: Found EXIF header. ExifData: IFD 0 at 8. ExifData: Loading 8 entries... ExifData: Loading entry 0x10f ('Make')... ExifData: Loading entry 0x110 ('Model')... ExifData: Loading entry 0x11a ('XResolution')... ExifData: Loading entry 0x11b ('YResolution')... ExifData: Loading entry 0x128 ('ResolutionUnit')... ExifData: Loading entry 0x213 ('YCbCrPositioning')... ExifData: Sub-IFD entry 0x8769 ('(null)') at 144. ExifData: Loading 9 entries... ExifData: Loading entry 0x9000 ('ExifVersion')... ExifData: Loading entry 0x9003 ('DateTimeOriginal')... ExifData: Loading entry 0x9004 ('DateTimeDigitized')... ExifData: Loading entry 0x9101 ('ComponentsConfiguration')... ExifData: Loading entry 0xa000 ('FlashPixVersion')... ExifData: Loading entry 0xa001 ('ColorSpace')... ExifData: Loading entry 0xa002 ('PixelXDimension')... ExifData: Loading entry 0xa003 ('PixelYDimension')... ExifData: Sub-IFD entry 0xa005 ('(null)') at 298. ExifData: Loading 2 entries... ExifData: Loading entry 0x1 ('InteroperabilityIndex')... ExifData: Loading entry 0x2 ('InteroperabilityVersion')... ExifData: Sub-IFD entry 0x8825 ('(null)') at 328. ExifData: Loading 11 entries... ExifData: Loading entry 0x0 ('GPSVersionID')... ExifData: Loading entry 0x1 ('InteroperabilityIndex')... ExifData: Loading entry 0x2 ('InteroperabilityVersion')... ExifData: Loading entry 0x3 ('GPSLongitudeRef')... ExifData: Loading entry 0x4 ('GPSLongitude')... ExifData: Loading entry 0x5 ('GPSAltitudeRef')... ExifData: Loading entry 0x6 ('GPSAltitude')... ExifData: Loading entry 0x7 ('GPSTimeStamp')... ExifData: Loading entry 0x12 ('GPSMapDatum')... ExifData: Loading entry 0x1b ('GPSProcessingMethod')... ExifData: Loading entry 0x1d ('GPSDateStamp')... ExifData: IFD 1 at 584. ExifData: Loading 6 entries... ExifData: Loading entry 0x103 ('Compression')... ExifData: Loading entry 0x11a ('XResolution')... ExifData: Loading entry 0x11b ('YResolution')... ExifData: Loading entry 0x128 ('ResolutionUnit')... ExifData: Sub-IFD entry 0x201 ('JPEGInterchangeFormat') at 678. ExifData: Sub-IFD entry 0x202 ('JPEGInterchangeFormatLength') at 44067. EXIF tags in '/n1/dcim/Camera/2010-03-17 08.44.25.jpg' ('Motorola' byte order): --------------------+---------------------------------------------------------- Tag |Value --------------------+---------------------------------------------------------- Manufacturer |google Model |Nexus One x-Resolution |72.00 y-Resolution |72.00 Resolution Unit |Inch YCbCr Positioning |centered Compression |JPEG compression x-Resolution |72.00 y-Resolution |72.00 Resolution Unit |Inch Exif Version |Exif Version 2.2 Date and Time (origi|2010:03:17 08:44:24 Date and Time (digit|2010:03:17 08:44:24 Components Configura|Y Cb Cr - FlashPixVersion |FlashPix Version 1.0 Color Space |sRGB PixelXDimension |1944 PixelYDimension |2592 Corrupt data The data provided does not follow the specification. ExifEntry: The tag 'GPSVersionID' contains an invalid number of components (3, expected 4). GPS tag version | North or South Latit|N Latitude |37.00, 21.00, 37.84 East or West Longitu|W Longitude |121.00, 52.00, 44.76 Altitude reference |Sea level reference Altitude |26.00 GPS time (atomic clo|08:44:22.00 Geodetic survey data|WGS-84 Name of GPS processi|18 bytes undefined data GPS date |2010:03:17 Interoperability Ind|R98 Interoperability Ver|0100 --------------------+---------------------------------------------------------- EXIF data contains a thumbnail (44067 bytes). $

The above with -d keeps processing, but the field GPSVersionID has corrupt data and normally the exif CLI stops processing when it gets there. What's wrong with the situation? Is Nexus One doing it wrong, or is exif library?

Ulmo commented 14 years ago

I left a copy of the picture at:

http://www.sonic.net/~qm/n1/2010-03-17%2008.44.25.jpg

remvee commented 14 years ago

The reported output is not produced by EXIFR. The commandline tool supplied by the module produces the following output, which seems fine to me:

exifr 2010-03-17\ 08.44.25.jpg 
2010-03-17 08.44.25.jpg:
                width = 1944
               height = 2592
                 bits = 8
          color_space = 1
  date_time_digitized = Wed Mar 17 08:44:24 +0100 2010
   date_time_original = Wed Mar 17 08:44:24 +0100 2010
         gps_altitude = Rational(26, 1)
     gps_altitude_ref = "\001"
       gps_date_stamp = "2010:03:17"
         gps_latitude = [Rational(37, 1), Rational(21, 1), Rational(946, 25)]
     gps_latitude_ref = "N"
        gps_longitude = [Rational(121, 1), Rational(52, 1), Rational(1119, 25)]
    gps_longitude_ref = "W"
        gps_map_datum = "WGS-84"
       gps_time_stamp = [Rational(8, 1), Rational(44, 1), Rational(22, 1)]
       gps_version_id = "\002\002\000"
                 make = "google"
                model = "Nexus One"
    pixel_x_dimension = 1944
    pixel_y_dimension = 2592
      resolution_unit = 2
         x_resolution = Rational(72, 1)
         y_resolution = Rational(72, 1)
   ycb_cr_positioning = 1