Nick (gagravarr) wrote,
gagravarr, now with geo tagged photos

I've finally been able to get the S60 Python camera stuff to play nicely in my code, so I've been able to do a new version of This is now able to take photos, and having taken then, add the special Geo Exif headers, which record where you were when you took the photo.

To do this, it makes use of the excellent PExif. There's only one snag, which is that pexif assumes a larger size of int than S60 has, so will sometimes trigger a OverflowError. The solution is to edit line 905 of, and drop the value of SEC_DEN to 10000.

Once you've done this, and installed pexif as a python library on your phone (or just loaded the .sis on, if you're not using a 3rd edition phone), you then get a new menu option, Take Photo. This will show you a preview, and you can use 1 and 3 to cycle through the resolutions to take at. When you're happy, hit 0 or enter, and it'll take the photo.

Annoyingly, the S60 python camera stuff is dog slow. So, it takes about a second to grab each preview shot, and about 2 seconds to take a real one. Add in a few seconds to save the image, and then geotag it, and it can be 7-8 seconds from when you hit enter until it's done. It's normally taken the photo after 2-3 seconds though!

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.