omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Reading EXIF data from photo

    Pythonista
    6
    8
    6833
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bee18
      bee18 last edited by

      Hi,

      I plan to write a simple app that puts a datetime stamp to a photo based on its EXIF data. So far I haven't found a way to read the EXIF data, especially using Pythonista. Can anybody give me a light on this? Thank you.

      -Bee

      1 Reply Last reply Reply Quote 0
      • Dann239
        Dann239 last edited by

        Check out the Photos module in the Pythonista documents. More specifically, photos.get_metadata.

        1 Reply Last reply Reply Quote 0
        • JonB
          JonB last edited by

          You can use the included in PIL module:

          http://stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image

          Note that _getexif() attribute might not exist if you opened a gif or png. Threw me off when I first tried this, since apparently screenshots in ios are taken as png, but named jpg, and that's what I had lying around in my pythonista folder.

          1 Reply Last reply Reply Quote 0
          • bee18
            bee18 last edited by

            If the photo doesn't have exif data, can I take the data from the file info e.g. datetime of file creation? Is there any python function to read it? Not the datetime of last file modification but the true file creation.

            Thank you.

            1 Reply Last reply Reply Quote 0
            • dgelessus
              dgelessus last edited by

              Theoretically you could use the os module's stat() function to check the creation date, though I don't know if it is accurate with photos imported from the camera roll.

              1 Reply Last reply Reply Quote 0
              • ccc
                ccc last edited by

                Code from your filenav would make it easy to do some experiments.

                1 Reply Last reply Reply Quote 0
                • techteej
                  techteej last edited by

                  Did you look at this yet?

                  1 Reply Last reply Reply Quote 0
                  • bee18
                    bee18 last edited by

                    Thank you for providing link to other projects. filenav seems pretty cool. I'll start with that. :)

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Powered by NodeBB Forums | Contributors