You should add the screenshot directly in your post.
B4X:
Dim header() As Byte = "SCREEN".GetBytes("UTF8")
Dim arr() As Byte
Dim buffer(header.Length + arr.Length + 4) As Byte
Dim raf As RandomAccessFile
raf.Initialize3(buffer, True)
raf.WriteBytes(header, 0, header.Length, raf.CurrentPosition)
raf.WriteBytes(arr, 0, arr.Length, raf.CurrentPosition)
raf.WriteInt(raf.CurrentPosition, raf.CurrentPosition)
astream.write(buffer)