sevaxx
sevaxx

Reputation: 681

How to draw a web page into a memory DC?

I would like to trick Chrome in to rendering its tabs in some memory device context of mine. Is this possible at all ? Thank you !

Upvotes: 1

Views: 384

Answers (1)

There's a method in chrome.tabs called captureVisibleTab. What you get back is either a PNG or JPEG.

http://code.google.com/chrome/extensions/tabs.html

That API is available to Chrome extensions - but you can't call it from ordinary JavaScript in an unextended browser. I presume this is the technique used by "Aviary Screen Capture".

If you have a C++ program running in its own process, and you want to "poke into" Chrome - there are a lot of dodgy ways to do window hooks and capturing. But why not save yourself the trouble? Chrome is based on WebKit - just use WebKit directly. Qt makes it super easy, for instance:

http://doc.qt.nokia.com/4.6/examples-webkit.html

Upvotes: 2

Related Questions