javascript - Send a print Screen without saving it -


I want to send the server's print screen at regular intervals (say, 60ms). Right now im doing the following.

Use this to capture and save a print screen

  & lt ;? Php $ im = imagegrabscreen (); Imagepng ($ im, "myscreenshot.jpg"); Imagedestroy ($ im); ? & Gt;   

then display it

  & lt; Img style = "border: 1px solid black" square = "pos_absolute" id = "myimage" src = "myscreenshot .jpg" alt = "image" width = "1360" height = "768" & gt;   

But with this method, I can only get the 1 S update rate. Maybe if I do not save images, then I will be able to get a better refresh rate. Is it possible to do this?

Thanks

imagepng Skip the second parameter - Output will go to browser:

yourcript.php

  header ('content-type: image / PNG'); $ Im = imagegrabscreen (); imagepng ($ im);   

then display it

theoutput.html

    

It seems that you are limited to the time that the server needs to act on the image and at that time the data needs to be sent to the network. You can speed it up on some better dedicated servers or minimize network communication.

It is possible that you can do this with the imagegrabscreen () , which is not meant to produce stream video you may be using the wrong tool, maybe Can you use it as a remote desktop or app?

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -