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 :
the new image ( document ) is not readable even if its size can be up to 100 Ko. any help please ?
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 ?