bskotu555 Active Member Feb 18, 2025 #1 B4A: Sub ReadFile(Dir As String, FileName As String) As Byte() Dim out As OutputStream out.InitializeToBytesArray(100) 'size not really important File.Copy2(File.OpenInput(Dir, FileName), out) Return out.ToBytesArray End Sub
B4A: Sub ReadFile(Dir As String, FileName As String) As Byte() Dim out As OutputStream out.InitializeToBytesArray(100) 'size not really important File.Copy2(File.OpenInput(Dir, FileName), out) Return out.ToBytesArray End Sub
aeric Expert Licensed User Longtime User Feb 18, 2025 #2 Maybe like this: B4X: ImageView1.GetBitmap.WriteToStream(out, 100, "PNG") Return out.ToBytesArray Upvote 0
E emexes Expert Licensed User Longtime User Feb 18, 2025 #3 aeric said: Maybe Click to expand... A good guess at an unclear question and with luck there will be some feedback from the OP as to how close you were to what is actually needed. Upvote 0
aeric said: Maybe Click to expand... A good guess at an unclear question and with luck there will be some feedback from the OP as to how close you were to what is actually needed.
bskotu555 Active Member Feb 19, 2025 #4 Unrecognized class member: getbitmap aeric said: Maybe like this: B4X: ImageView1.GetBitmap.WriteToStream(out, 100, "PNG") Return out.ToBytesArray Click to expand... Upvote 0
Unrecognized class member: getbitmap aeric said: Maybe like this: B4X: ImageView1.GetBitmap.WriteToStream(out, 100, "PNG") Return out.ToBytesArray Click to expand...
E emexes Expert Licensed User Longtime User Feb 19, 2025 #5 bskotu555 said: Unrecognized class member: getbitmap Click to expand... Presumably aiming for this but overshot by three letters Upvote 0
bskotu555 said: Unrecognized class member: getbitmap Click to expand... Presumably aiming for this but overshot by three letters
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2025 #6 Change the type of ImageView to B4XView. Upvote 0
E emexes Expert Licensed User Longtime User Feb 19, 2025 #7 Erel said: Change the type of ImageView to B4XView. Click to expand... I knew there must be a reason you're paid big bikkies. Upvote 0
Erel said: Change the type of ImageView to B4XView. Click to expand... I knew there must be a reason you're paid big bikkies.