I use cefpython inside PySide on Python 2.7. To create advanced 3d transitions between div's I have to cut the div in e.g. 20 parts which I can animate separately. I found no way to do that "natively" so I have to simulate the split by taking a screenshot of a specific element in the dom (I could also take a screenshot of the whole dom and cut out the required element by coordinates.).
How can I take a screenshot of a specific div in my DOM or how could I take a screenshot of the whole visibile part of a Webpage in cefpython and PySide.
JavaScript functions often just render the html into a picture but I need a completely real picture since the user should not know that the animation is created from a picture instead of a real div.
Is there an easy way to capture an element (or the whole currently visible part) of a Webpage using cefpython and PySide (or JavaScript and HTML)?
( By the way: Cefpython embed a chromium browser into PySide.)
You can render contents of the window that embeds a browser to a bitmap. In pyqt/pyside you can render QWidget to QImage. For an example google "qwidget to qimage": https://www.google.com/search?q=qwidget+to+qimage