base64 Data to Image File

165 views
Skip to first unread message

ECEisLife

unread,
Mar 27, 2021, 10:52:20 PM3/27/21
to DroidScript
Hi

I have an image data in this format
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...

I want to save this data into a png file.

I tried using an Image Object virtually andI use Img.Save() to save but an error "WARNING: Img.Save) failed! (imageFile.png (Read-only file system))" is logged on the console. I want to save the image without adding the CreateImage object into layout. I used html app by the way.

Regards
Jumar

Alan Hendry

unread,
Mar 28, 2021, 10:43:03 AM3/28/21
to DroidScript
Hi,
If this is Android 10 then see my recent posts about saving images, like

ECEisLife

unread,
Mar 29, 2021, 2:28:42 AM3/29/21
to DroidScript
Hi Alan

It's not what I'm looking for, I think the nearest solution is the SetPixelData on image control and save the image to a file.

Regards

Cemal

unread,
Mar 29, 2021, 4:11:58 AM3/29/21
to DroidScript
I don't have any idea saving images without app.CreateImage.

https://groups.google.com/g/androidscript/c/BAHq2W6xBks/m/qPAJYqAPBQAJ

Can you try look this threads.

29 Mart 2021 Pazartesi tarihinde saat 09:28:42 UTC+3 itibarıyla ECEisLife şunları yazdı:

Dave

unread,
Mar 29, 2021, 8:51:06 AM3/29/21
to DroidScript
Using a hidden image control should work in theory, it sounds like you have a permissions issue.

Do you have some sample code we can test?

Reply all
Reply to author
Forward
0 new messages