CutyCapt is a cross-platform command-line utility to capture WebKit's rendering of a web page into a variety of image formats. It depends on Qt.
There is also a similar tool to capture the MS IE output, iecapt.