derez Expert Licensed User Longtime User Mar 29, 2011 #1 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). Code: 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.jpg 4 KB · Views: 425 pic.jpg 18.9 KB · Views: 465 Last edited: Mar 29, 2011
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). Code: 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 ?
K kickaha Well-Known Member Licensed User Longtime User Mar 30, 2011 #2 You need Code: out.Close after you have written the bitmap. Upvote 0