Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::metadata::MetaData::focalLength (   self,
  missing = '' 
)

Returns in string format the focal length of the lens used to record the image.

Returns missing if the metadata value is not present.

Reimplemented in rapid::metadata::DummyMetaData.

Definition at line 216 of file metadata.py.

00216                                      :
        """ 
        Returns in string format the focal length of the lens used to record the image.
        
        Returns missing if the metadata value is not present.
        """
        try:
            if usesRational:
                f = str(self["Exif.Photo.FocalLength"])
                f0,  f1 = f.split('/')
            else:
                f0, f1 = self["Exif.Photo.FocalLength"]
                
            f0 = float(f0)
            if not f1:
                f1 = 1.0
            else:
                f1 = float(f1)

            return "%.0f" % (f0 / f1)
        except:
            return missing
            
            
    def cameraMake(self, missing=''):


Generated by  Doxygen 1.6.0   Back to index