B4J Question B4XBitmap - WriteToStream - ReadFromStream

LucaMs

Expert
Licensed User
Longtime User
The second method, ReadFromStream, does not exist.

I suppose for technical problems. Anyway, I have to search for a way to "realize" it :(


Found this Erel's routine (Snippets forum):
B4X:
Sub FileToBytes (Dir As String, FileName As String) As Byte()
   Return Bit.InputStreamToBytes(File.OpenInput(Dir, FileName))
End Sub

Of course it will work, I have not tried, but... even if the question is correct (how come the WriteToStream method exists and not its reciprocal ReadFromStream), I already have an array of bytes and I have to load them into a B4XBitmap (B4J) .

Searching again :):(
 
Last edited:
Top