A new version of the widget2image service using PhantomJS.
Install phantomjs.
sudo npm install -g phantomjsClone the repository.
git clone git://github.com/andrewsf/w2i2.git
cd w2i2Get project dependencies.
npm installnode server.jsNow you can use the service like so: http://localhost:9242/getimage?url=http://google.com/
Required. String. The URL of the page or asset to capture.
Optional. String. Default: "1600x1200". The dimensions of the viewport within which the widget can be seen.
Optional. Integer. The height that the final screenshot should be scaled to. Takes precedence over scaledToWidth.
Optional. Integer. The width that the final screenshot should be scaled to. Cannot be used if scaledToHeight is used.
http://localhost:9242/getimage?url=https%3A%2F%2Fgoogle.com/
http://localhost:9242/getimage?url=https%3A%2F%2Fgoogle.com/&screenSize=1050x550
http://localhost:9242/getimage?url=https%3A%2F%2Fgoogle.com/&screenSize=1050x550&scaledToWidth=450