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.


    Photos Module, PIL, and layer.image

    Pythonista
    2
    3
    2643
    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.
    • Cubbarooney104
      Cubbarooney104 last edited by

      Howdy all! I'm working on getting used to the photos module, which is fairly simple. However, I have one small difficulty: how to use the photos in the scene module.

      The basic function of the hypothetical program is it takes a picture and then starts a scene. In this scene is a layer (we'll call it [self.layer]). I want to then do [self.layer.image = picture], where [picture] is the photo I just created. Only problem is that [capture_image()] returns no string value.

      I realize that photos use the PIL, something I know next to nothing (okay, perhaps nothing) about. Is there a way to name the picture?

      Thanks,
      Cubbarooney

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

        You can use the load_pil_image function to load an image from the photos module into a scene.

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

          Thanks omz!

          By the way, this is why I love Python. It is so simple, yet is very adaptable.

          Cubbarooney

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