in reply to save browser's result to image file

Consider ImageMagick. If you can get all the pieces to work, then this works:
convert http://www.stonehenge.com/index.html image.gif
A lot of stuff has to be installed, but it looks like Magick when it works!

And then if you're really lucky, you can also get Perl to drive that with PerlMagick.

Much Smoke. Many Mirrors. But pretty spiffy when it comes together.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.