You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpexif# Modify the exif in a fileimg=pexif.JpegFile.fromFile("test.jpg")
img.exif.primary.ImageDescription="Hello world!"img.writeFile("tmp1.jpg")
python test.py
Traceback (most recent call last):
File "test.py", line 4, in <module>
img = pexif.JpegFile.fromFile("test.jpg")
File "/home/pat1/tmp/jpg/pexif.py", line 1002, in fromFile
return JpegFile(f, filename=filename, mode=mode)
File "/home/pat1/tmp/jpg/pexif.py", line 1065, in __init__
attempt = segment_class(mark, input, data, self.mode)
File "/home/pat1/tmp/jpg/pexif.py", line 858, in __init__
DefaultSegment.__init__(self, marker, fd, data, mode)
File "/home/pat1/tmp/jpg/pexif.py", line 151, in __init__
self.parse_data(data)
File "/home/pat1/tmp/jpg/pexif.py", line 902, in parse_data
ifd = IfdTIFF(self.e, offset, self, self.mode, tiff_data)
File "/home/pat1/tmp/jpg/pexif.py", line 418, in __init__
actual_data = self.embedded_tags[tag][1](e, the_data, exif_file, self.mode, data)
File "/home/pat1/tmp/jpg/pexif.py", line 412, in __init__
exif_type_size(exif_type), components,
File "/home/pat1/tmp/jpg/pexif.py", line 250, in exif_type_size
return ExifType.lookup.get(exif_type).size
AttributeError: 'NoneType' object has no attribute 'size'
attached the sample image; sorry for the subject ;)
The text was updated successfully, but these errors were encountered:
with this simple test program:
attached the sample image; sorry for the subject ;)
The text was updated successfully, but these errors were encountered: