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.


    How to Save Images With and Without EXIF Metadata to Camera Roll/Clipboard

    Editorial
    3
    4
    2615
    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.
    • zjtafsjgd7
      zjtafsjgd7 last edited by

      Hi there,

      In my Editorial workflow, I want to get an image from the clipboard or the camera roll, do some processing, and then export the image to the clipboard or the camera roll by either a) including or b) excluding the original EXIF image metadata (I am mainly interested in the geolocation information).

      From my testing, it seems photos are always exported without the original metadata. Can I trust this to be always true? I assume the img object in the following Python script doesn't even contain the metadata itself, is this correct? On the other hand, how can I actually include the metadata when exporting the image to the clipboard or camera roll?

      import photos
      import clipboard
      
      
      # Image input: From camera roll or clipboard
      img = photos.get_image(-1)
      # img = clipboard.get_image()
      
      # Processing
      # ...
      
      # Image output: To camera roll or clipboard
      # Depending on user choice, I want the exported image to either include or exclude the metadata
      photos.save_image(img)
      # clipboard.set_image(img, format='jpg', jpeg_quality=1)
      

      Thanks for any help!

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

        You are in the Editorial forums, try the Pythonista forum.

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

          Oops sorry, I actually meant Editorial (edited original post).

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

            http://omz-software.com/pythonista/docs/ios/photos.html#photos.get_metadata

            The Photos module has a get_metadata() function but does not have a put_metadata() function so images saved to the camera roll are stripped of all metadata.

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