drewnoakes / metadata-extractor

Extracts Exif, IPTC, XMP, ICC and other metadata from image, video and audio files
Apache License 2.0
2.59k stars 480 forks source link

Detect incorrect makernote offsets #404

Open jnioche opened 5 years ago

jnioche commented 5 years ago

[FEATURE REQUEST]

Copied from https://stackoverflow.com/q/56445656/432844

EXIFTool can detect when the offset of tags is incorrect

[ExifTool] Warning : [minor] Possibly incorrect maker notes offsets (fix by 1060?)

Can we detect incorrect offsets with metadata-extractor and ideally fix them in the same way?

drewnoakes commented 5 years ago

Can you provide an image with such incorrect offsets? Without one it's impossible to verify a fix.

jnioche commented 5 years ago

panasonic sony

There are two images attached that give the warning. When you use the -F switch in exiftool the offsets are fixed and some more fields are then visible (inc internal serial number).

drewnoakes commented 5 years ago

@jnioche thank you for the images. I don't know when I or anyone else will get to look at this, but at least whoever does has all the info they need. If you want to try and fix this yourself I'd be happy to review a pull request.

jniocheCF commented 5 years ago

The corresponding code in EXIFtool is https://github.com/exiftool/exiftool/blob/master/lib/Image/ExifTool/MakerNotes.pm#L1305

drewnoakes commented 5 years ago

@jniocheCF have you looked at whether that technique could be applied to this project?

jnioche commented 5 years ago

@drewnoakes not yet, the comment above was a note to myself