You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Herve M. (JIRA)" <ji...@apache.org> on 2012/10/09 21:00:03 UTC

[jira] [Created] (IMAGING-92) Issue trying to update GPS metadata info in a JPG

Herve M. created IMAGING-92:
-------------------------------

             Summary: Issue trying to update GPS metadata info in a JPG
                 Key: IMAGING-92
                 URL: https://issues.apache.org/jira/browse/IMAGING-92
             Project: Commons Imaging
          Issue Type: Bug
          Components: Format: JPEG
    Affects Versions: 1.0
         Environment: Windows 7, Java 1.6
            Reporter: Herve M.


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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (IMAGING-92) Issue trying to update GPS metadata info in a JPG

Posted by "Damjan Jovanovic (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IMAGING-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Damjan Jovanovic resolved IMAGING-92.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0

Fix committed, thank you!

                
> Issue trying to update GPS metadata info in a JPG
> -------------------------------------------------
>
>                 Key: IMAGING-92
>                 URL: https://issues.apache.org/jira/browse/IMAGING-92
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 1.0
>         Environment: Windows 7, Java 1.6
>            Reporter: Herve M.
>             Fix For: 1.0
>
>         Attachments: IMAGING-92.patch
>
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (IMAGING-92) Issue trying to update GPS metadata info in a JPG

Posted by "Herve M. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IMAGING-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve M. updated IMAGING-92:
----------------------------

    Attachment: IMAGING-92.patch

Patch
                
> Issue trying to update GPS metadata info in a JPG
> -------------------------------------------------
>
>                 Key: IMAGING-92
>                 URL: https://issues.apache.org/jira/browse/IMAGING-92
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 1.0
>         Environment: Windows 7, Java 1.6
>            Reporter: Herve M.
>         Attachments: IMAGING-92.patch
>
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (IMAGING-92) Issue trying to update GPS metadata info in a JPG

Posted by "Herve M. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IMAGING-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473450#comment-13473450 ] 

Herve M. edited comment on IMAGING-92 at 10/10/12 6:34 PM:
-----------------------------------------------------------

Patch attached
                
      was (Author: hmarmy):
    Patch
                  
> Issue trying to update GPS metadata info in a JPG
> -------------------------------------------------
>
>                 Key: IMAGING-92
>                 URL: https://issues.apache.org/jira/browse/IMAGING-92
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 1.0
>         Environment: Windows 7, Java 1.6
>            Reporter: Herve M.
>         Attachments: IMAGING-92.patch
>
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (IMAGING-92) Issue trying to update GPS metadata info in a JPG

Posted by "Herve M. (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IMAGING-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472722#comment-13472722 ] 

Herve M. commented on IMAGING-92:
---------------------------------

Found issue in TiffOutputSet.java
GPS Tags are mixed, I'll propose a patch soon.
                
> Issue trying to update GPS metadata info in a JPG
> -------------------------------------------------
>
>                 Key: IMAGING-92
>                 URL: https://issues.apache.org/jira/browse/IMAGING-92
>             Project: Commons Imaging
>          Issue Type: Bug
>          Components: Format: JPEG
>    Affects Versions: 1.0
>         Environment: Windows 7, Java 1.6
>            Reporter: Herve M.
>
> 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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira