How to decode images?
Some operations return images as an array of bytes (System.Byte()) while other return a URL pointing to a temporary copy of the image stored on our servers. Pointing to a URL may be the best approach for a web application. If your application is local, or if you want to make a local copy of the image, you should use the binary approach. Following is some sample VB code that shows how to turn the array of bytes into an image: ‘here we are using the XigniteSurvey service as an example ‘RemoteSurvey is the web reference to the XigniteSurvey service Dim objWebService as New RemoteSurvey.XigniteSurvey() Dim objResult As RemoteSurvey.SurveyChartBinary = objWebService.RespondWithChartBinary(… your parameters here…) ‘this command creates an image based on a stream converted from the array of bytes Dim objImage As New System.Drawing.Bitmap(New System.IO.MemoryStream(objResult.Chart.ByteArray)) ‘you can save then it locally or use it in your application objImage.Save(“c:\image.bmp”, System.D