Forum Archive

Open share dialog

Webmaster4o

Can I have a script generate a PIL Image, then open the standard iOS Share menu so the image can be opened in another app?

omz

You can use the Open in… menu like this:

import Image
import console
img = Image.new('RGB', (100, 100), 'green')
img.save('image.png')
console.open_in('image.png')
Webmaster4o

Hmm.... This crashes pythonista for me. Running on iPad mini 2

Webmaster4o

It's actually the save line that causes the crash.

Webmaster4o

It's a problem with PNGs. JPEGs work fine.

Gerzer

PNG images work fine for me in the latest beta. Perhaps a 1.5 bug fixed in 1.6?

Webmaster4o

@Gerzer maybe.
@omz can I display a dialog that is the share dialog? The one that includes mail, message, save image, and open in? At a higher level than "open in"