google-code-export / thebigpicture

Automatically exported from code.google.com/p/thebigpicture
1 stars 1 forks source link

Possible strange repeat of EXIF record. #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

    im = Photo('image.jpg')
    print 'ImageWidth: ', im.getexif('ImageWidth')

What is the expected output? What do you see instead?

Get an exception that "Tag ImageWidth occurs in multiple records!".
What actually happens is that in metainfofile.py
    def __getRecordAndTagNum__(self, tag, record = None):
cycles through the EXIF records looking for the tag.
For some reason, record 1 (tiff) and tag 6 (ifd1) both use
the TIFFIFD class, meaning ImageWidth is repeated.

The chances are I'm confused by the exif.py code in
    def getRecord(self, rec_num):
but it still seems strange.

I realize that I could just do a:
    im.getexif('ImageWidth', 'tiff')

What version of the product are you using? On what operating system?

alpha 2 on vista.

Original issue reported on code.google.com by tuss...@gmail.com on 25 Jun 2008 at 4:33