You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a related problem setting GPS coordinates via pexif and looking at them via Exiv2 or other software which use the libexiv2 library: if the numerator of the rational expressing the seconds of latitude or longitude is greather than (2^32)/2, it triggers an overflow in libexiv2, thus showing the number as negative. So I opened an issue on Exiv2.
May be it is so crazy that pexif uses a so huge denominator (50000000), which is rather an overkill for the precision of seconds of lat/lon. Changing that value with something lower than 35791394, will avoid the overflow.
I solved this problem for me with setting SEC_DEN to 5000 before calling set_geo: pexif.JpegFile.SEC_DEN = 5000 img.set_geo(gps_data['lat'], gps_data['lon'])
Hello! I have the following error while writing image with new coordinates which have been set by set_geo function:
I debug the code a little and saw that if we have here
seconds more than 42,94967294 we have such an error.
So, why do you need to multiply seconds to
JpegFile.SEC_DEN = 50000000
at all?Thanks!
The text was updated successfully, but these errors were encountered: