As I can understand you are trying to send some image data from your server to your client and what you can do is send the data always in say jpeg format or something which both your client and server can understand and then save the data from the client into some temp location and then display the screen shot into your desired area.

I hope I have understood the problem correctly.