Logo Search packages:      
Sourcecode: zope-cmfphoto version File versions  Download package

def CMFPhoto::Photo::Photo::getEXIF (   self  ) 

Extracts the exif metadata from the image and returns
it as a hashtable

Definition at line 444 of file Photo.py.

00444                      :
        """
        Extracts the exif metadata from the image and returns
        it as a hashtable
        """
        import EXIF

        try:
            data = EXIF.process_file(StringIO(str(self.data)))
        except:
            data = {}
        if not data:
            data = {}

        keys = data.keys()
        keys.sort()

        result = {}

        for key in keys:
            if key in ('JPEGThumbnail', 'TIFFThumbnail'):
                continue
            try:
                result[key] = str(data[key].printable)
            except:
                pass
        return result

    security.declareProtected(CMFCorePermissions.View, 'exif_orientation')
    def exif_orientation(self):


Generated by  Doxygen 1.6.0   Back to index