hMatoba / Piexif

Exif manipulation with pure python script.
MIT License
367 stars 81 forks source link

Lat Lon in Deg,Min,Seconds #12

Closed paulvija closed 8 years ago

paulvija commented 8 years ago

Hi there, I am not able to do this:

assign gps coordinates

gps_ifd = {piexif.GPSIFD.GPSLatitudeRef: "S", piexif.GPSIFD.GPSLatitude: "((40, 1), (41, 1), (476051999, 10000000))", piexif.GPSIFD.GPSLongitudeRef: "W", piexif.GPSIFD.GPSLongitude: "((165, 1), (22, 1), (14268000, 10000000))" } While dumping get "UnboundLocalError: local variable 'new_value' referenced before assignment" Is there a proper way of doing this or not capable at this point?

Thanks

paulvija commented 8 years ago

Found out by myself.

gps_ifd = {piexif.GPSIFD.GPSLatitudeRef: "S", piexif.GPSIFD.GPSLatitude: [(40, 1), (41, 1), (476051999, 10000000) ], piexif.GPSIFD.GPSLongitudeRef: "W", piexif.GPSIFD.GPSLongitude: [ (165, 1), (22, 1), (14268000, 10000000) ] }