[ 
https://issues.apache.org/jira/browse/IMAGING-221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839208#comment-16839208
 ] 

Bruno P. Kinoshita commented on IMAGING-221:
--------------------------------------------

[~joakimk], attached file "mine.JPG". And below is the output of running the 
code that sets GPS coords:
{noformat}
file: /home/kinow/Downloads/mine.JPG
XResolution: 72
DateTime: '2019:03:10 23:29:59'
DateTimeOriginal: '2019:03:10 23:29:59'
DateTimeDigitized: '2019:03:10 23:29:59'
PhotographicSensitivity: 125
ShutterSpeedValue: 5
ApertureValue: Not Found.
BrightnessValue: Not Found.
GPSLatitudeRef: Not Found.
GPSLatitude: Not Found.
GPSLongitudeRef: Not Found.
GPSLongitude: Not Found.


    item: ImageDescription: 'This is a test comment!'
    item: Make: 'Sony'
    item: Model: 'E5823'
    item: Orientation: 1
    item: XResolution: 72
    item: YResolution: 72
    item: ResolutionUnit: 2
    item: Software: '32.4.A.1.54_0_f500'
    item: DateTime: '2019:03:10 23:29:59'
    item: YCbCrPositioning: 1
    item: ExifOffset: 8
    item: GPSInfo: 27680
    item: ExposureTime: 10/320 (0.031)
    item: FNumber: 2
    item: PhotographicSensitivity: 125
    item: ExifVersion: 48, 50, 50, 48
    item: DateTimeOriginal: '2019:03:10 23:29:59'
    item: DateTimeDigitized: '2019:03:10 23:29:59'
    item: ComponentsConfiguration: 1, 2, 3, 0
    item: ShutterSpeedValue: 5
    item: ExposureCompensation: 0
    item: MeteringMode: 5
    item: LightSource: 0
    item: Flash: 16
    item: FocalLength: 423/100 (4.23)
    item: MakerNote: 83, 79, 78, 89, 32, 77, 79, 66, 73, 76, 69, 0, 9, 0, 15, 
32, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 36, 32, 7, 0, 96, 0, 0, 0, -6, 2, 0, 0, 37, 
32, 1, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0... (20292)
    item: UserComment: '?This is a test comment!'
    item: SubSecTime: '737529'
    item: SubSecTimeOriginal: '737529'
    item: SubSecTimeDigitized: '737529'
    item: FlashpixVersion: 48, 49, 48, 48
    item: ColorSpace: 1
    item: ExifImageWidth: 3840
    item: ExifImageLength: 2160
    item: InteropOffset: 602
    item: CustomRendered: 0
    item: ExposureMode: 0
    item: WhiteBalance: 0
    item: DigitalZoomRatio: 1
    item: SceneCaptureType: 0
    item: SubjectDistanceRange: 0
    item: InteroperabilityIndex: 'R98'
    item: InteroperabilityVersion: 48, 49, 48, 48
    item: Compression: 6
    item: Orientation: 1
    item: XResolution: 72
    item: YResolution: 72
    item: ResolutionUnit: 2
    item: JpgFromRawStart: 20928
    item: JpgFromRawLength: 6487
    item: Caption/Abstract: This is a test comment!

{noformat}

> updateExifMetadataLossless restructures meta data (and problems with Maker 
> Notes)
> ---------------------------------------------------------------------------------
>
>                 Key: IMAGING-221
>                 URL: https://issues.apache.org/jira/browse/IMAGING-221
>             Project: Commons Imaging
>          Issue Type: Bug
>            Reporter: Joakim Knudsen
>            Assignee: Bruno P. Kinoshita
>            Priority: Major
>             Fix For: 1.0-alpha2
>
>         Attachments: mine.JPG, mine.JPG.html, original.JPG, original.html, 
> test.JPG, test.html
>
>
> ExifRewriter's *updateExifMetadataLossless* method causes the meta data of 
> the JPEG to be completely reordered after writing. This, in itself, might not 
> be a big concern, but it's a bit unexpected when the method is named 
> "lossless". More worryingly, I also find problems are introduced wrt. the 
> Maker Notes tag (odd offset). 
> I've produced an example of the problem in the attached JPEG file, using 
> ExifTool to validate/analyze the images before and after. The image is taken 
> by a Sony Xperia Z5 phone, and the "original.JPG" validates OK. After 
> modifying the contents of the UserComments tag (value: "Test") the modified 
> image produces a warning:
> Verifying the attached photo using ExifTool gives the following output:
> $ ./exiftool\(-k\).exe -validate -warning -a ../test.JPG
> -- press RETURN --
>  
> Validate                        : 1 Warning (all minor)
> Warning                         : [minor] Possibly incorrect maker notes 
> offsets (fix by -628?)
>  
> Using ExifTool's -htmldump option, it is easy to see how the meta data has 
> been affected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to