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.


    Loading images into gui.

    Pythonista
    5
    6
    5953
    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.
    • Vertec
      Vertec last edited by

      How do I go about loading images into a pythonista ui from photo roll.

      The purpose is just to have my own profile logo in the corner of my scripts.

      I can load the library images but I can't seem to get a photo roll image into the library or load from my own file path within pythonista

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

        Try using ui.ImageView; it takes an image from PIL.Image.open() and if presented, displays it

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

          I'm still having trouble with this. I just want to use an image already sitting in the images folder in pythonista.

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

            Assuming your image file is in the same folder as your script, you can load it into an image view like this:

            my_image_view.image = ui.Image.named('image.png')
            

            (jpeg would also work, of course.)

            heyguy4 1 Reply Last reply Reply Quote 0
            • chibill
              chibill last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • heyguy4
                heyguy4 @omz last edited by

                @omz Whenever I try that, I get an error that says "Expected a texture object".

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