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
-
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. -
@oldCovfefe problem is that doc is not correct
Imageview.image is an ui.image, not a PIL image
see hereCheck in app, console, button "?", modules, ui module, ui.image
-
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.
-
@oldCovfefe to see all, try
import ui iv = ui.ImageView() print(dir(iv)) iv.image = ui.Image.named('test:Peppers') print(dir(iv.image))
-
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
-
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.