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.


    Can ui.imageview() display gif images?

    Pythonista
    6
    8
    3293
    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.
    • donnieh
      donnieh last edited by

      Can ui.imageview() display gif images?

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

        ImageView can only display ui.Images... but ui.Image.named() should be able to open a gif, at least of the non animated variety.

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

          https://forum.omz-software.com/topic/2319/multi-frame-gifs-to-clipboard-or-photos might be helpful.

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

            I think he means animated gifs @JonB

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

              It works when using ImageView.load_from_url.

              import ui
              
              
              def load(sender):
              	url = 'https://img01.sogoucdn.com/app/a/100540022/2019030913484662642362.gif'
              	img_v.load_from_url(url)
              
              frame = 0, 0, *ui.get_screen_size()
              
              v = ui.View()
              v.background_color = 'white'
              v.right_button_items = [
              	ui.ButtonItem(
              		title='Load',
              		action=load,
              	)
              ]
              img_v = ui.ImageView(frame=frame)
              img_v.content_mode = ui.CONTENT_CENTER
              v.add_subview(img_v)
              v.present('fullscreen')
              

              But I really want to know how can I use ui.ImageView to display local gif files.

              cvp 1 Reply Last reply Reply Quote 0
              • cvp
                cvp @mieq last edited by

                @mieq see here

                mieq 2 Replies Last reply Reply Quote 0
                • mieq
                  mieq @cvp last edited by

                  @cvp said:

                  @mieq see here

                  oh, you are so genius.๐Ÿ‘Thanks a lot!

                  1 Reply Last reply Reply Quote 0
                  • mieq
                    mieq @cvp last edited by

                    @cvp Learn a lot from your script,Thanks again for your help.๐Ÿ˜†

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