Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I save a screenshot of the returned bitmap file ? #17

Open
Mylab6 opened this issue Feb 3, 2016 · 3 comments
Open

How do I save a screenshot of the returned bitmap file ? #17

Mylab6 opened this issue Feb 3, 2016 · 3 comments

Comments

@Mylab6
Copy link

Mylab6 commented Feb 3, 2016

I've been working with this for a solid 4 hours, and I can not figure it out.

The best I can do is an array of the pixel values .

@Mikej81
Copy link

Mikej81 commented Sep 28, 2017

Did you figure this out? I can do it on the client-side pretty easily with canvas.toDataUrl(), but I want it on the server-side on mouse isPressed = true.

@EddieCanales
Copy link

@Mikej81 @Mylab6 Here's a gist that shows how I've done it.
https://gist.github.com/FabledWeb/8253b74ad3f26778aadfb063f19a6a46

The idea is to create a buffer image the size of the screen, then as you get back bitmaps (they are bitmaps of a part of the screen), write that to the buffer image at the correct location.

Then whenever you need to see the screen (on some interval or based on some other code), write that to disk.

@Mikej81
Copy link

Mikej81 commented Oct 11, 2017

Nice! I'll try this out as soon as I can. This is how I'm doing it on each mouseclick now, not ideal, but its working: https://github.com/Mikej81/WebRDP/blob/master/socket/index.js#L53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants