Window.capturePage as NodeJS Buffer #480

Closed
siriux opened this Issue Feb 27, 2013 · 4 comments

Comments

Projects
None yet
4 participants

siriux commented Feb 27, 2013

Hi,

I want to write a capturePage to a file, and I think it would be really interesting to be able to get the result of Window.capturePage as NodeJS Buffer as an option.

This would avoid converting to Base64 and back again if you want to save the capture to a file.

Do you think this could be implemented?

Thanks,
Pablo

Member

rogerwang commented Feb 28, 2013

Yes. This is very doable and we'd like to support it.

siriux commented Feb 28, 2013

Good. I'm looking forward to it.

Thanks,
Pablo

Hello Node-Webkit developers...

I would also vote for this one, the current API, Window.capturePage takes between 106 to 320 milliseconds to capture an 800x600 document - this is something I would really love to see optimised (as best as possible) ... Will create an issue for the optimisation request.

Thank you .

Contributor

FWeinb commented Feb 21, 2014

I would really like to see this feature! I am building https://github.com/FWeinb/nodeshot which would really benefit from this.

[Edit]
The transformation is done here: https://github.com/rogerwang/node-webkit/blob/master/src/browser/capture_page_helper.cc?source=c#L142-L150

To create a buffer from std::vector<unsigned char> data something like this should work.

@rogerwang rogerwang closed this in 7a9f258 Mar 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment