Hi
I'm storing png, jpeg files in an SQL Server database using IMAGE fields.
My b4a app is downloading these using a asp.net JSON web service.
The b4a JSONParser library returns the image field as a comma separated int value string, rather than a hex string.
I can't figure out a method for converting this to a byte array, and thus to a bitmap object, or write as a file.
JSON String from Web Service:
[{"Attachment":[255,216,255,224,0,16,74,70,73,70,0,1,1,0,0,1,0,1,0,0,255,219,0,67...............],"Filename":"Photo.jpg"}]
...
AttachmentString = Row.Get("Attachment")
AttachmentString =
[255,216,255,224,0,16,74,70,73,70,0,1,1,0,0,1,0,1,0,0,255,219,0,67...............]
How do I convert AttachmentString in to a byte array?
I'm storing png, jpeg files in an SQL Server database using IMAGE fields.
My b4a app is downloading these using a asp.net JSON web service.
The b4a JSONParser library returns the image field as a comma separated int value string, rather than a hex string.
I can't figure out a method for converting this to a byte array, and thus to a bitmap object, or write as a file.
JSON String from Web Service:
[{"Attachment":[255,216,255,224,0,16,74,70,73,70,0,1,1,0,0,1,0,1,0,0,255,219,0,67...............],"Filename":"Photo.jpg"}]
...
AttachmentString = Row.Get("Attachment")
AttachmentString =
[255,216,255,224,0,16,74,70,73,70,0,1,1,0,0,1,0,1,0,0,255,219,0,67...............]
How do I convert AttachmentString in to a byte array?