B4X:
Dim Buffer() As Byte 'declare an empty byte array
Buffer = cursor1.GetBlob("image")
Dim IpSt As InputStream
Dim Bitmap1 As Bitmap
IpSt.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Bitmap1.Initialize2(IpSt)
IpSt.Close
ImageView1.SetBitmap(CreateRoundBitmap(Bitmap1, ImageView1.Width))
the error comes when it reaches this line
B4X:
Bitmap1.Initialize2(IpSt)
below is the error that comes up
B4X:
Student Names
19-07561
Error occurred on line: 411 (Curveextracts)
java.lang.RuntimeException: Error loading bitmap.
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.Initialize2(CanvasWrapper.java:539)
at b4a.example.curveextracts$ResumableSub_ReadBlob.resume(curveextracts.java:1672)
at b4a.example.curveextracts._readblob(curveextracts.java:1267)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:22)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1764)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)