ianare / exif-py

Easy to use Python module to extract Exif metadata from digital image files.
BSD 3-Clause "New" or "Revised" License
831 stars 191 forks source link

Return early if sequence is unexpectedly a string #177

Closed nickdimitroff closed 1 year ago

nickdimitroff commented 1 year ago

I have checked this against the grass image in issue #43 -- it appears to have had a broken header.

Function ev_bias expects a series of numbers, I added an early return to avoid the string comparison, and am now able to get EXIF data out of the image.

~/exif-py$ ./EXIF.py grass.jpeg 
Opening: grass.jpeg
File has JPEG thumbnail
EXIF ColorSpace (Short): sRGB
EXIF ComponentsConfiguration (Undefined): YCbCr
EXIF CompressedBitsPerPixel (Ratio): 2
EXIF Contrast (Short): Normal
EXIF CustomRendered (Short): Normal
EXIF DateTimeDigitized (ASCII): 2014:12:07 20:31:30
...

Close issue #43

nickdimitroff commented 1 year ago

Will clean up commits and resubmit PR.