

@staticmethod
def get_exif_dict(imgpath):
    rd = ImageAdapter.get_raw_exif(imgpath)
    clean_data = {
        
    }
    if (('ApertureValue' in rd) and isinstance(rd['ApertureValue'], tuple)):
        clean_data['aperture'] = ('F%.1f' % (rd['ApertureValue'][0] / float(rd['ApertureValue'][1])))
    if ('Artist' in rd):
        clean_data['artist'] = unicode(rd['Artist'])
    if ('Copyright' in rd):
        clean_data['copyright'] = unicode(rd['Copyright'])
    if (('ExposureTime' in rd) and isinstance(rd['ExposureTime'], tuple)):
        clean_data['exposure'] = ('%s/%s' % (rd['ExposureTime'][0], rd['ExposureTime'][1]))
    if (('FocalLength' in rd) and isinstance(rd['FocalLength'], tuple)):
        clean_data['focal'] = (unicode(rd['FocalLength'][0]) + 'mm')
    if ('ISOSpeedRatings' in rd):
        clean_data['iso_value'] = unicode(rd['ISOSpeedRatings'])
    if ('Model' in rd):
        clean_data['camara_model'] = unicode(rd['Model'])
    if ('Software' in rd):
        clean_data['software'] = unicode(rd['Software'])
    if ('ExposureProgram' in rd):
        ep = rd['ExposureProgram']
        if (ep in exposure_translate):
            clean_data['exposure_programm'] = exposure_translate[ep]
    if ('ColorSpace' in rd):
        cs = rd['ColorSpace']
        if (cs in color_space_translate):
            clean_data['color_space'] = color_space_translate[cs]
    if ('Flash' in rd):
        fl = rd['Flash']
        if (fl in flash_translate):
            clean_data['flash'] = flash_translate[fl]
    return clean_data

dataset/ETHPy150Open niwinz/niwi-web/src/niwi/photo/image.py ImageAdapter.get_exif_dict/original