Android Question convert file image to Byte Array

Roberto P.

Well-Known Member
Licensed User
Longtime User
there is a tool that lets you convert an image file into byte array? This I need to send a file to print.
thanks in advance
 
Hello, please I tried using this tool to convert an image (.jpg) into byte array and got the following:
error: incompatible types: byte[] cannot be converted to byte
Need help please.
 
Upvote 0
Please post the relevant code.
Code:
Sub GetImageBytes() as Byte
  Dim bytes() As Byte = Bit.InputStreamToBytes(File.OpenInput(File.DirRootExternal,"MyApp/profile.jpg")
  Return bytes
End Sub
 
Upvote 0
Back
Top