How to save webkit page image resources from memory?
问题 I open page with python, gtk, and webkit. Now - how to save image from that page without downloading it again from the internet? 回答1: Here is a python program that will save a rendered web page to an image: http://pastie.org/4572412 This should be the section of primary interest to you: size = self.browser.mainFrame().contentsSize() if width > 0: size.setWidth(width) self.browser.setViewportSize(size) # Render the virtual browsers viewport to an image. image = QImage(self.browser.viewportSize