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

def CMFPhoto::Photo::Photo::exif_orientation (   self  ) 

XXX

Definition at line 473 of file Photo.py.

00473                               :
        """XXX
        """
        exif = self.getEXIF()
        mirror = 0;
        rotation = 0;
        
        if not exif.has_key('Image Orientation'):
            return (mirror, rotation)
        
        code = exif.get('Image Orientation')

        try:
            code = int(code)
        except ValueError:
            return (mirror, rotation)
            
        if code in (2, 4, 5, 7):
            mirror = 1
        if code in (1, 2):
            rotation = 0
        elif code in (3, 4):
            rotation = 180
        elif code in (5, 6):
            rotation = 90
        elif code in (7, 8):
            rotation = 270
       
        return (mirror, rotation)
 
    security.declareProtected(ChangeCacheSettingsPermission, 'ZCacheable_setManagerId')
    def ZCacheable_setManagerId(self, manager_id, REQUEST=None):


Generated by  Doxygen 1.6.0   Back to index