Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-92

Issue trying to update GPS metadata info in a JPG

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-alpha1
    • 1.0-alpha1
    • Format: JPEG
    • None
    • Windows 7, Java 1.6

    Description

      I'm trying to update the GPS metadata of pictures done with a Canon SX 230HS
      using the code on trunk (0.98)
      CODE :
      File original = new File("D:
      IMG_0772.JPG");
      MetadataExample.metadataExample(original);
      File newFile = new File("D:
      IMG_0772NEW.JPG");
      new WriteExifMetadataExample().setExifGPSTag(original, newFile);
      MetadataExample.metadataExample(newFile);

      We can see that that the Metadata is not set correctly.
      I tried with pictures from an IPhone -> same issue.

      OUTPUT :
      file: D:\IMG_0772.JPG
      XResolution: 180
      DateTime: '2012:10:03 20:37:18'
      DateTimeOriginal: '2012:10:03 20:37:18'
      DateTimeDigitized: '2012:10:03 20:37:18'
      PhotographicSensitivity: 800
      ShutterSpeedValue: 189/32 (5.906)
      ApertureValue: 104/32 (3.25)
      BrightnessValue: Not Found.
      GPSLatitudeRef: 'N'
      GPSLatitude: 36, 49, 2935/1000 (2.935)
      GPSLongitudeRef: 'E'
      GPSLongitude: 31, 17, 59291/1000 (59.291)

      GPS Description: [GPS. Latitude: 36 degrees, 49 minutes, 2.935 seconds N, Longitude: 31 degrees, 17 minutes, 59.291 seconds E]
      GPS Longitude (Degrees East): 31.299803055555557
      GPS Latitude (Degrees North): 36.817481944444445
      GPS Latitude: 36 degrees, 49 minutes, 2.935 seconds N
      GPS Longitude: 31 degrees, 17 minutes, 59.291 seconds E

      item: ImageDescription: ''
      item: Make: 'Canon'
      item: Model: 'Canon PowerShot SX230 HS'
      item: Orientation: 6
      item: XResolution: 180
      item: YResolution: 180
      item: ResolutionUnit: 2
      item: DateTime: '2012:10:03 20:37:18'
      item: YCbCrPositioning: 2
      item: ExifOffset: 252
      item: GPSInfo: 4900
      item: ExposureTime: 1/60 (0.017)
      item: FNumber: 31/10 (3.1)
      item: PhotographicSensitivity: 800
      item: Unknown Tag (0x8830): 4
      item: ExifVersion: 48, 50, 51, 48
      item: DateTimeOriginal: '2012:10:03 20:37:18'
      item: DateTimeDigitized: '2012:10:03 20:37:18'
      item: ComponentsConfiguration: 1, 2, 3, 0
      item: CompressedBitsPerPixel: 3
      item: ShutterSpeedValue: 189/32 (5.906)
      item: ApertureValue: 104/32 (3.25)
      item: ExposureCompensation: 0
      item: MaxApertureValue: 104/32 (3.25)
      item: MeteringMode: 5
      item: Flash: 89
      item: FocalLength: 5
      item: MakerNote: 29, 0, 1, 0, 3, 0, 48, 0, 0, 0, 112, 4, 0, 0, 3, 0, 3, 0, 4, 0, 0, 0, -48, 4, 0, 0, 4, 0, 3, 0, 34, 0, 0, 0, -40, 4, 0, 0, 6, 0, 2, 0, 28, 0, 0, 0, 28, 5, 0, 0, 7... (3800)
      item: UserComment: ''
      item: FlashpixVersion: 48, 49, 48, 48
      item: ColorSpace: 1
      item: ExifImageWidth: 4000
      item: ExifImageLength: 2248
      item: InteropOffset: 4822
      item: FocalPlaneXResolution: 4000000/244 (16'393.443)
      item: FocalPlaneYResolution: 3000000/183 (16'393.443)
      item: FocalPlaneResolutionUnit: 2
      item: SensingMethod: 2
      item: FileSource: 3
      item: CustomRendered: 0
      item: ExposureMode: 0
      item: WhiteBalance: 0
      item: DigitalZoomRatio: 1
      item: SceneCaptureType: 0
      item: InteroperabilityIndex: 'R98'
      item: InteroperabilityVersion: 48, 49, 48, 48
      item: RelatedImageWidth: 4000
      item: RelatedImageLength: 2248
      item: GPSLatitudeRef: 'N'
      item: GPSLatitude: 36, 49, 2935/1000 (2.935)
      item: GPSLongitudeRef: 'E'
      item: GPSLongitude: 31, 17, 59291/1000 (59.291)
      item: GPSTimeStamp: 17, 37, 16936/1000 (16.936)
      item: GPSStatus: 'A'
      item: GPSMapDatum: 'WGS-84'
      item: GPSDateStamp: '2012:10:03'
      item: Compression: 6
      item: XResolution: 180
      item: YResolution: 180
      item: ResolutionUnit: 2
      item: JpgFromRawStart: 5620
      item: JpgFromRawLength: 4254

      file: D:\IMG_0772NEW.JPG
      XResolution: 180
      DateTime: '2012:10:03 20:37:18'
      DateTimeOriginal: '2012:10:03 20:37:18'
      DateTimeDigitized: '2012:10:03 20:37:18'
      PhotographicSensitivity: 800
      ShutterSpeedValue: 189/32 (5.906)
      ApertureValue: 104/32 (3.25)
      BrightnessValue: Not Found.
      GPSLatitudeRef: Not Found.
      GPSLatitude: 40, 43, 1/2147483647 (0)
      GPSLongitudeRef: Not Found.
      GPSLongitude: Not Found.

      item: ImageDescription: ''
      item: Make: 'Canon'
      item: Model: 'Canon PowerShot SX230 HS'
      item: Orientation: 6
      item: XResolution: 180
      item: YResolution: 180
      item: ResolutionUnit: 2
      item: DateTime: '2012:10:03 20:37:18'
      item: YCbCrPositioning: 2
      item: ExifOffset: 4558
      item: GPSInfo: 8
      item: ExposureTime: 1/60 (0.017)
      item: FNumber: 31/10 (3.1)
      item: PhotographicSensitivity: 800
      item: Unknown Tag (0x8830): 4
      item: ExifVersion: 48, 50, 51, 48
      item: DateTimeOriginal: '2012:10:03 20:37:18'
      item: DateTimeDigitized: '2012:10:03 20:37:18'
      item: ComponentsConfiguration: 1, 2, 3, 0
      item: CompressedBitsPerPixel: 3
      item: ShutterSpeedValue: 189/32 (5.906)
      item: ApertureValue: 104/32 (3.25)
      item: ExposureCompensation: 0
      item: MaxApertureValue: 104/32 (3.25)
      item: MeteringMode: 5
      item: Flash: 89
      item: FocalLength: 5
      item: MakerNote: 29, 0, 1, 0, 3, 0, 48, 0, 0, 0, 112, 4, 0, 0, 3, 0, 3, 0, 4, 0, 0, 0, -48, 4, 0, 0, 4, 0, 3, 0, 34, 0, 0, 0, -40, 4, 0, 0, 6, 0, 2, 0, 28, 0, 0, 0, 28, 5, 0, 0, 7... (3800)
      item: UserComment: ''
      item: FlashpixVersion: 48, 49, 48, 48
      item: ColorSpace: 1
      item: ExifImageWidth: 4000
      item: ExifImageLength: 2248
      item: InteropOffset: 480
      item: FocalPlaneXResolution: 4000000/244 (16'393.443)
      item: FocalPlaneYResolution: 3000000/183 (16'393.443)
      item: FocalPlaneResolutionUnit: 2
      item: SensingMethod: 2
      item: FileSource: 3
      item: CustomRendered: 0
      item: ExposureMode: 0
      item: WhiteBalance: 0
      item: DigitalZoomRatio: 1
      item: SceneCaptureType: 0
      item: InteroperabilityIndex: 'R98'
      item: InteroperabilityVersion: 48, 49, 48, 48
      item: RelatedImageWidth: 4000
      item: RelatedImageLength: 2248
      item: GPSLatitude: 40, 43, 1/2147483647 (0)
      item: GPSTimeStamp: 17, 37, 16936/1000 (16.936)
      item: GPSStatus: 'A'
      item: GPSMapDatum: 'WGS-84'
      item: GPSDestLatitudeRef: 'N'
      item: GPSDestLongitudeRef: 'W'
      item: GPSDestLongitude: 74, 0, 0
      item: GPSDateStamp: '2012:10:03'
      item: Compression: 6
      item: XResolution: 180
      item: YResolution: 180
      item: ResolutionUnit: 2
      item: JpgFromRawStart: 5620
      item: JpgFromRawLength: 4254

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            hmarmy Herve M.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment