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.


    Working with pictures

    Pythonista
    3
    4
    2281
    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.
    • Kluesi
      Kluesi last edited by

      Hi

      I want to add a greyscale image (a logo) to a picture. I wrote a little ios pythonista app in which I open a picture from an album and show it on the view in an ui.imageview. This works.

      And the other magic is missing. I want to show the logo (I have the black logo on a white background as an jpg or png image) on the loaded picture. I want to change the size of the logo by using two fingers and I want to move the logo by using one finger. The last step is to combine both pictures and save the result in an album.

      1. How to show only the non white parts of the logo on my picture
      2. How to move it with one finger
      3. How to chsnge the size with two fingers

      Many thanks

      Kluesi

      mikael 1 Reply Last reply Reply Quote 0
      • mikael
        mikael @Kluesi last edited by

        @Kluesi, is the logo always the same? Use an external app like Magic Eraser to turn the white to transparent pixels.

        Gestures supports pinch for resizing and pan for moving.

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

          Here is a stack overflow answer and I have not tried it. https://stackoverflow.com/questions/765736/using-pil-to-make-all-white-pixels-transparent

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

            Moving a view and changing size based on segmentedcontrol selection https://gist.github.com/357b2aef8c09a15289c6193597035861

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