This question already has an answer here:
(这个问题已经在这里有了答案:)
I'm working on web application that needs to render a page and make a screenshot on the client (browser) side.
(我正在开发需要呈现页面并在客户端(浏览器)端进行屏幕截图的Web应用程序。)
I don't need the screenshot to be saved on the local HDD though, just kept it in RAM and send it to the application server later.
(不过,我不需要将屏幕快照保存在本地HDD上,只需将其保存在RAM中,然后将其发送到应用程序服务器即可。)
I researched:
(我研究了:)
- BrowserShots alike services...
(BrowserShots类似服务...)
- Mechanized browsers...
(机械化浏览器...)
- wkhtmltoimage...
(wkhtmltoimage ...)
- Python WebKit2PNG...
(Python WebKit2PNG ...)
But none of those gives me all I need, which is:
(但是这些都不能满足我的需求,那就是:)
- Processing at browser side (generate screenshot of page).
(在浏览器端进行处理(生成页面的屏幕截图)。)
Don't need to be saved on HDD!(不需要保存在硬盘上!)
Just...(只是...)
- ...send image to Server for further processing.
(...将图像发送到服务器进行进一步处理。)
- Capturing whole page (not only visible part)
(捕获整个页面(不仅可见部分))
Eventually I came upon Google's Feedback Tool (click "feedback" on YouTube footer to see this).
(最终,我使用了Google的反馈工具(点击YouTube页脚上的“反馈”即可看到此信息)。)
It contains JavaScript for JPG encoding and two other huge scripts which I can't determine what exactly they do...(它包含用于JPG编码的JavaScript和另外两个庞大的脚本,我无法确定它们到底在做什么……)
But it's processed on the Client side - otherwise there would be no point putting this huge JPEG encoder in the code!
(但是它是在客户端进行处理的-否则,将这个巨大的JPEG编码器放入代码中毫无意义!)
Anyone have any idea how did they made it / how I can make it?
(任何人都知道他们是如何做到的/我怎么做到的?)
Here is an example of the feedback (report a bug on some screens)
(这是反馈的示例(在某些屏幕上报告错误))
ask by Pawe? Szymański translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…