views:

45

answers:

2

I am working on a Ruby on Rails app that visualizes product trees. The tree is built of nodes an everything is rendered in HTML/CSS3. Some of the products make several hundred SQL queries as the tree builds up (up to 800 queries on the biggest tree).

I'd like to have small thumbnails of each tree to present it on an index page. So rendering each tree once again and modifying CSS to make a tiny representation is an option.

But i think it's probably easier to generate thumbnails, crop, cache, and show these on the index page.

Any ideas on how to do this? Any links/articles/blog posts that could help me?

A: 

Check out websnapr; it looks like they provide 100,000 free snaps a month.

Steven
Thanks for tip. Websnapr will not fit my needs for a number of reasons: 1) screenshots are client confidential and web application is password protected. 2) i want to crop away parts of the page before generating thumbnail. No need to show menu.All in all, I'd prefer a solution running from the webserver or my local machine.
Jesper Rønn-Jensen
A: 

I should check this site more often. :D Anyway, I've done some more research and it looks like you'll need to set up some server-side scripts that will open a browser to the page, take a screenshot, and dump the file/store in database/etc.

Steven