Oct-01-2016, 09:33 PM
Hello,
When pillow 2.1.0 was released, it included the following:
caveat: (I did underline experimental)
Has anyone had success with this? I have been developing on MS windows 7 pro (unfortunately for me) as of late, and always get 'None' as a reply.
here's a sample:
Is there another way to do this? All I really want are the image dimensions
Larz60+
When pillow 2.1.0 was released, it included the following:
Quote:(1.1.4b1 released)
+ Added experimental EXIF support for JPEG files. To extract EXIF
information from a JPEG file, open the file as usual, and call the
"_getexif" method. If successful, this method returns a dictionary
mapping EXIF TIFF tags to values. If the file does not contain EXIF
data, the "_getexif" method returns None.
caveat: (I did underline experimental)
Has anyone had success with this? I have been developing on MS windows 7 pro (unfortunately for me) as of late, and always get 'None' as a reply.
here's a sample:
from PIL import Image class SizeOfImage: def __init__(self, filename=None): self.filename = filename def get_exif(self): ret = {} i = Image.open(self.filename) info = i._getexif() print('info: {}'.format(info)) return ret if __name__ == '__main__': szimg = SizeOfImage(filename='images/generalmotors.jpg') szimg.get_exif()The image opens fine, but the result I get from above code is always None. I've tried it with several images with the same results.
Is there another way to do this? All I really want are the image dimensions
Larz60+