I have a byte array (png image) stored in a row in my SQLite database.
I need to extract the image and send it to a file on my PC server.
I'm using Prefix mode.
I am getting the image out of the SQLite table using
I believe the blb array will NOT be in LittleEndian. I have tried to copy the array using ByteConverter as follows:
and subsequently I would like to send the BLOB array to my server as a memory stream, if possible.
Apparently, the prefix mode "size" bytes are still not in the proper order, thus the data transmission size is distorted.
Is there a way to use Prefix mode to send an "in memory" byte array stream to the PC server without having to save it to a file and send from there?
Thanks,
Rusty
I need to extract the image and send it to a file on my PC server.
I'm using Prefix mode.
I am getting the image out of the SQLite table using
B4X:
Dim Blb() As Byte = RCsr.GetBlob("Data")
B4X:
Dim Blb() As Byte = RCsr.GetBlob("Data")
Dim Blob(Blb.Length) As Byte
Dim bc As ByteConverter
bc.LittleEndian = True 'convert to little endian
bc.ArrayCopy(Blb, 0, Blob, 0, Blb.Length)
Astreams.Write(Blob) 'Send the byte array containing the image
Apparently, the prefix mode "size" bytes are still not in the proper order, thus the data transmission size is distorted.
Is there a way to use Prefix mode to send an "in memory" byte array stream to the PC server without having to save it to a file and send from there?
Thanks,
Rusty