3 ms·
I also wrote a screenshot server (in JavaScript) for the project which is running at that subdomain. It's using Webkit for the screenshots then node-imagemagick
by dangrossman 15y ago
I also wrote a screenshot server (in JavaScript) for the project which is running at that subdomain. It's using Webkit for the screenshots then node-imagemagick to crop and resize. I hope to open source that part eventually too, but I have a bunch of things to fix still (some bugs in my worker/queue system, and some problems with my setup of the X server), and I need to remember all the steps I took to get it working to document it for others.
Unfortunately AFAIK all the current tools for automating webkit/khtml still require an X server so it's not quite as easy to set up as cloning a repo and running the code.
http://url2png.com/ http://url2png.com/ would make a good drop-in replacement in the meantime, but it's not free.
- dabeeeenster 15y agoI'd love to help out if you are able to open source it one day. I spoke to the owner of url2png and he's a great guy, but I'd rather roll my own services for that sort of thing! It seems like getting a working setup with headless X is the tricky part...
- phpnode 15y agoI've had success with wkhtmltoimage for this, it's part of wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/ http://code.google.com/p/wkhtmltopdf/
- sgrove 15y agoWhy not use something like Sauce Labs? I built a screenshotting service on top of them using soda (https://github.com/learnboost/soda https://github.com/learnboost/soda) a long time ago, and the code's bit-rotted by now, but it was quick and easy, and combined with firefox's full-page-screenshot, you can get some awesome results. Their entry-level plan is free, so you could easily have a "put your Sauce Labs credentials in this file and we'll take screenshots in the background".
- owyn 15y agophantom.js can do this, and the bonus is that it's already written in javascript. :) It depends on QT for it's webkit component but that's it... Doing a screenshot with it is pretty much a one liner: page.open(address, function() { page.render(path); }); http://www.phantomjs.org/ http://www.phantomjs.org/