This algorithm takes a screenshot of the input URL and outputs a PNG. The first parameter is the URL to take a screenshot of. The 2nd parameter is the location/filename where you want the PNG to be saved to . The 3rd parameter is the viewport width. The 4th parameter is the viewport height. You could leave out the viewport width and height to take a screenshot of the entire page. (For backwards compatibility, you could also set the viewport width or height to 0 to take a screenshot of the entire page.)
Flash and WebGL are not supported.