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.


    Complete doc/refernce for ui.ImageView

    Pythonista
    4
    6
    2698
    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.
    • oldCovfefe
      oldCovfefe last edited by

      Hello all,
      new here. Really like Pythonista for prototyping and messing with REST Apis. Also love the idea of including iPhone/iPad specific capabilities. Working on images and photos from camera and camera roll. I see that ui.ImageView has many attributes and methods, but I cannot seem to find any doc for it. The online doc shows 2 or 3, and code complete teases me with whats available, but doesn't tell me the parameters and such. Any pointers where to get a complete reference? Thanks much.

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

        @oldCovfefe problem is that doc is not correct
        Imageview.image is an ui.image, not a PIL image
        see here

        Check in app, console, button "?", modules, ui module, ui.image

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

          Thanks. I understand they are not the same image types, and the conversion is straight forward, but problem remains ui.ImageView as a class is not documented. I checked "?" in the console, and it's the same as online at the web site. There are only 3 items in the docs, the constructor, the image "attribute" (property) which is an ui.Image object type, and one method, i.e. load_from_url(url). There are however many other attributes, such as width, height, autosizing, alpha, background_color, etc. a lot might be inherited from iu.View() but there might be more.

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

            @oldCovfefe to see all, try

            import ui
            iv = ui.ImageView()
            print(dir(iv))
            iv.image = ui.Image.named('test:Peppers')
            print(dir(iv.image))
            
            1 Reply Last reply Reply Quote 1
            • JonB
              JonB last edited by

              ui.ImageView is a subclass of ui.View. so it has all of the attributes and methods of ui.View, as well as a few of it's own

              1 Reply Last reply Reply Quote 1
              • twloveduck
                twloveduck last edited by

                Or to make it easy on yourself:

                import ui
                viewSet = set(dir(ui.View))
                print(set(dir(ui.ImageView)).difference(viewSet))
                

                It will give you the methods that are unique to the ImageView class and not inherited from View.
                It is just {'image', 'load_from_url'}

                Everything else is from the View and should be documented there.

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