Save bitmap failure

derez

Expert
Licensed User
Longtime User
Using code from the documentation for saving a bitmap to a file, I found that it works when I use emulator but fail on my device (A81E).

B4X:
Sub savebtn_Click
Dim out As OutputStream
qual = et.Text
out = File.OpenOutput(File.DirRootExternal & "/paint",(counter + 1) & ".jpg",False)
cnvs.Bitmap.WriteToStream(out,qual,"JPEG")
counter = counter + 1
End Sub

The data stream is terminated in the middle, as in the attached photo. The bitmap size is 645* 430
Any idea to the cause of the problem ?
 

Attachments

  • 4.jpg
    4 KB · Views: 212
  • pic.jpg
    pic.jpg
    18.9 KB · Views: 245
Last edited:
Top