Forum Archive

Allow photo in image view

donnieh

You can see in the code below what I want to do. How is this done? The way I have it doesn't work obviously.

self.image_view.image = photos.pick_image()
omz

Try something like:

self.image_view.image = ui.Image.from_data(photos.pick_image(raw_data=True))

If this is in a button action or something like that, you may need to decorate that with @ui.in_background (the photo picker can't be invoked from the main UI thread currently).

donnieh

Works perfect, thanks.