Can I save ui.Image as an external file with the format of jpeg (or png). If I can transform ui.Image into PIL Image, that would do.
What I want to do is snapshot an image on ui.View and save that image as a jpeg file.
Here is my code and I can only make a ui.Image, but don’t know how to make a jpeg file from it.
with ui.ImageContext(100, 100) as ctx:
...
... v = ui.ImageView(width=100,height=100)
... label = ui.Label(text='testlabel')
... v.add_subview(label)
... v.draw_snapshot()
... label_img= ctx.get_image()
...
type(label_img)