0

Possible Duplicate:
Using HTML5/Canvas/Javascript to take screenshots

Is there a way to copy the main graphics context of the HTML page into a canvas?

From Javascript, I'd like to grab a "screen shot" of the current visible HTML page and copy it to a thumbnail image or canvas. (Not from a separate "screen capture" app, but from within the javascript page itself)

Community
  • 1
  • 1
J Sprague
  • 1,008
  • 11
  • 15

1 Answers1

1

You can't do it. But If you using google chrome you can write a chrome extension, this give you new javascript functions for capturing images, for example:

chrome.tab.captureVisibleTab( ....)

For example, you can check the source code Webpage Screenshot Extesnion: https://chrome.google.com/webstore/detail/webpage-webcam-screenshot/ckibcdccnfeookdmbahgiakhnjcddpki

Aminadav Glickshtein
  • 23,232
  • 12
  • 77
  • 117
  • Thank you for the responses. I would agree that this is a duplicate - but it did not come up as a possible match when I entered the question, so I did not see it. I thank you for the references to tools that appear very interesting - unfortunately, won't quite meet my needs. I was hoping there might be some low-level DOM element that contained the actual bitmap representation of the entire rendered page that I could easily access. Since we actually own the browser on our primary device, we'll probably look into adding a hook to get at the HTML engine's frame buffer. – J Sprague Jan 29 '13 at 23:47