One way is: Linux + a flavor of XWindows + Mozilla + some shell scripting + a Postscript to JPG converter.
Another approach is to find a tool that will convert HTML into something like postscript. And from postscript, there's tools out there to convert to PNG, GIF, and JPG (if I remember correctly). I had a tool that did this, but it choked pretty badly on medium sized pages or pages with bad or complex HTML (and the pages it did work on, it wasn't very impressive). If you're using Windows, expect to shell out some cash to get a DLL/library to do this.
A google search will yield a lot of results too.