Android Question bitmap.resize

Rachbob

Member
Licensed User
Hello everyone,

in my project i need to save a compressed image file from a large one to make it easy for upload.
i tried this code :
B4X:
Dim btmp As Bitmap
btmp.Initialize(File.DirRootExternal & "/picture",FileName)

Dim Out As OutputStream
Out = File.OpenOutput(File.DirRootExternal &"/picture", "Test.png", False)
btmp.Resize(btmp.Width/5,btmp.Height/5,True).WriteToStream(Out, 50, "PNG")
Out.Close

the new image ( document ) is not readable even if its size can be up to 100 Ko. any help please ?
 

JohnC

Expert
Licensed User
Longtime User
See if this thread will help:

 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
see:

 
Upvote 0
Top