Hi, I want to ask about WritetoStream multiple imageview. I have 2 image on 2 imageview and 2 sub for stream to file
I want to create it to file for upload.
if i call each sub form different button (sample) button1 click -> callsub : loadktp and button2 click -> callsub : loadselfie , it can stream each image to A.jpg and B.jpg file.
My problem is when I call all sub from button3 -> callsub loadktp and callsub loadselfie, I only got B.jpg and .jpg (without A) and it damage pict.
Please help. Thanks
stream sub:
Sub loadktp(namafl As String)
Dim kt As Bitmap
kt.Initialize(File.DirAssets,"back2.jpg")
kt = imgKTP.Bitmap
Dim out As OutputStream
out = File.OpenOutput(LokasiImg, "A.jpg", False)
kt.WriteToStream(out, 60, "JPEG")
out.Close
End Sub
Sub loadselfie(namafl As String)
Dim sf As Bitmap
sf.Initialize(File.DirAssets,"back2.jpg")
sf = imgSelfie.Bitmap
Dim out1 As OutputStream
out1 = File.OpenOutput(LokasiImg, "B.jpg", False)
sf.WriteToStream(out1, 60, "JPEG")
out1.Close
End Sub
if i call each sub form different button (sample) button1 click -> callsub : loadktp and button2 click -> callsub : loadselfie , it can stream each image to A.jpg and B.jpg file.
My problem is when I call all sub from button3 -> callsub loadktp and callsub loadselfie, I only got B.jpg and .jpg (without A) and it damage pict.
Please help. Thanks