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.


    Reload image while running scene?

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

      Is there a way to reload image after the scene was started? Ex I have an image with a cat, and some other program (maybe thread of current program) modifies the image, so now it has cat and dog. And I want scene to reload the image so different image will be shown?

      P. S. Sorry if the question is unclear, I am not an English Pro :)

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

        Take a look at photo_frame.py. The key line is: self.photo_layer.image = get_random_photo(). The idea is that you need to create a (fullscreen?) scene.Layer and then copy the name of the photo that you want displayed to that Layer's .image property. Whenever you change the .image property, the new image will be drawn. If this is not working for your use case then please post some sample code.

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

          Ohhh, thanks a lot! That did the trick :).
          Was so easy btw.

          P. S. Sorry for the long answer - I had some problems with my network.

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