How to use the exif.parse_usercomment function in exif

To help you get started, we’ve selected a few exif examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twpayne / igc2kmz / igc2kmz / photo.py View on Github external
if self.jpeg.exif['GPSLongitudeRef'] == 'W\0':
                lon = -lon
            if 'GPSAltitude' in self.jpeg.exif:
                gps_altitude = self.jpeg.exif['GPSAltitude']
                ele = float(gps_altitude[0]) / gps_altitude[1]
                self.elevation_data = True
            else:
                ele = 0
                self.elevation_data = False
            self.coord = Coord.deg(lat, lon, ele)
        else:
            self.coord = None
            self.elevation_data = None
        if 'UserComment' in self.jpeg.exif:
            user_comment = self.jpeg.exif['UserComment']
            self.description = exif.parse_usercomment(user_comment)
        else:
            self.description = None

exif

Read and modify image EXIF metadata using Python.

MIT
Latest version published 2 years ago

Package Health Score

72 / 100
Full package analysis