Esempio n. 1
0
    def EXIF(self):
        try:
            content = default_storage.open(str(self.image)).read()
            im = PILImage.open(BytesIO(content))
        except IOError:
            return

        try:
            return EXIF.process_file(im)
        except:
            try:
                return EXIF.process_file(im, details=False)
            except:
                return {}
Esempio n. 2
0
    def EXIF(self):
        try:
            content = default_storage.open(unicode(self.image)).read()
            im = PILImage.open(StringIO(content))
        except IOError:
            return

        try:
            return EXIF.process_file(im)
        except:
            try:
                return EXIF.process_file(im, details=False)
            except:
                return {}