need help on image transfer over network
I am trying to build remote desktop application using java. For that what I have planned is to take screen shot of screen using Robot and convert it to byte array(bmp image) and send it. In server side read image into byte array and conve开发者_Python百科rt to image and display. Successive images are compared with previous image and only different bytes are sent(along with start index where difference starts and length of difference). In server side I only read difference bytes and construct image.
Is this method suitable to use over internet(with moderate speed)?.
Please specify any better way to do it, if you feel this will not work on internet.
This sounds similar (at a very high level) to the VNC protocol.
Rather than trying to invent your own, perhaps you could just adopt the protocol that it uses (RFB - remote frame buffers) or at the least look at it to get some ideas (using rectangles to denote areas of the screen that have changed sounds better than indices into a byte array). The documentation can be found here.
精彩评论