3

I'm working on a project where I want to read metadata from .jpg images, and write them to a file. I took some photos taken on an Olympus TG-4 and tried to read the Exif data with Python 3.

My script says:

import exifread
f = open('P8110003.JPG', 'rb')
tags = exifread.process_file(f)

I get the message 'Possibly corrupted field Tag 0x0000 in MakerNote IFD' I've tried five different jpg files, they all result in the same message. I took the pictures today - are they all really corrupt?

This is does not return an error:

import PIL.Image
import PIL.ExifTags
img = PIL.Image.open('P8110003.JPG')
exif_data = img._getexif()

exif = {
    PIL.ExifTags.TAGS[k]: v
    for k, v in img._getexif().items()
    if k in PIL.ExifTags.TAGS
}

list(exif_data.values())
print(exif_data.values())

So I assume the camera stores the metadata in some proprietary format Exifread doesn't expect? I just want to read the metadata and store it in a text file, then import into a database. I guess reading it out of the dictionary is an workable solution. Would be interested if anyone could shed any light on why Exifread isn't working.

1
  • I just tried the same script with a photo taken on a different camera - different model and manufacturer - and I got no error. Aug 12, 2018 at 4:11

1 Answer 1

4

I was doing some small research because of a similar issue. I know the question is old, but maybe some new person will have the same issue(like me).

What is MarkerNote Tag? The "MakerNote" tag contains image information normally in a proprietary binary format, some of this "manufacturer-specific" were "decoded", but they shouldn't contain information that should be accessible to "outside world".

Why this MarkerNote Tags get so easily corrupted? The proprietary formats could break if the MakerNote tag is moved by inserting or editing a tag that precedes it(e.g add a copyright info or an Exif comment).

Should I worry? Although some of the manufacturers keep important information in this proprietary format(e.g Nikon for ISO Speed), the information is, usually, not important.

What should I do? Just ignore it, it doesn't affect the photo quality or relevant information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.