Loading...
Logo
Processing Forum
Hello,

I'm trying to use seltar's post to web with android. I see java.awt.image don't work with android.

PostToWeb with BytesToWeb works fine with the right android permission.
TIFF support is also working.

But I found no way to get an bytearray as an PNG of an PGraphic.

Is there an easy way to get it with an ByteArrayOutputStream.

Thank you
Greetings from Germany
Thomas

Replies(1)

Thank you for this hint. I will try it.
Maybe it works without an temporary PGraphics. I think the problem is an interrupting graphics render. It seems that it don't wait till save() is finished.

My testsketch just draw a line and save it to my webserver. Without the temporary PGraphics it looks like this:

while saving it is interrupted.

And my sketch with the temporary PGraphics:

it works correctly.


But I don't need to find my temporary file in the mediadatabase.

Greetings from Germany
Thomas