concord-consortium / shutterbug

A rack utility using phantomjs that will create and save images (pngs) for a part of your web page's current dom. These images become available as public '.png' resources in the rack application. Currently shutterbug supports HTML, SVG and Canvas elements.
Other
27 stars 3 forks source link

support saving images as jpg also #1

Closed stepheneb closed 9 years ago

stepheneb commented 11 years ago

I took a couple of snapshots from http://lab.dev.concord.org/interactives.html with the Interactive rendered at a large size and saved them locally.

jpg versions appear to be about 25% of the size of a png version

Here's the difference in sizes for the original png and a jpg version saved at 60% quality setting:

127K ae60661dc80.png
 32K ae60661dc80.jpg

168K b1c1b503128.png
 46K b1c1b503128.jpg

The quality of the jpg images looked fine on a quick inspection.

pjanik commented 9 years ago

It has been implemented recently: https://github.com/concord-consortium/shutterbug.js#basic-usage