grab picture and draw in the WebCanvas

Sub getPic()
  dim picdata as string
  dim MyHttpSocket as new HTTPSocket
  picdata =  MyHttpSocket.get("http://192.168.0.25/1.bmp",2)
  dim bs as new binaryStream(picdata)
  dim mb as memoryBlock
  mb = bs.read(bs.length)
  pic = picture.fromData(mb)
End Sub

pic a property of the webPage,Error occurred UnsupportedFormatException at “pic = picture.fromData(mb)”,I don’t know how to solve the problem. Who can help me .

You need to check that something actually downloaded. With such a short timeout you’re probably getting an empty string back.