khtml2png is a command line program to create PNG images out of webpages. Despite the name, it can also produce JPEG images.