Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digineo/thumbshooter
A generator for website thumbshots
https://github.com/digineo/thumbshooter
Last synced: 6 days ago
JSON representation
A generator for website thumbshots
- Host: GitHub
- URL: https://github.com/digineo/thumbshooter
- Owner: digineo
- License: other
- Created: 2009-09-26T19:20:06.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2013-04-18T09:40:11.000Z (over 11 years ago)
- Last Synced: 2024-10-18T22:11:05.506Z (28 days ago)
- Language: Ruby
- Homepage: http://www.digineo.de/
- Size: 120 KB
- Stars: 11
- Watchers: 5
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Warning!**
Do _not_ use this gem! It is no longer maintained!Thumbshooter
============Generates thumbshots of URLs by using Webkit and QT4.
Requirements
============Please ensure python-qt4 and qt4-webkit is installed.
apt-get install libqt4-ruby libqt4-webkit
You do also need a running x server. You can use a lightweight
x server by doing "apt-get install xvfb" and enabling it:Thumbshooter.use_xvfb = true
Usage
=======#Setup options:
shooter = Thumbshooter.new(
:screen => '800x600',
:resize => '600x450',
:crop => '200x150'
)#Generate thumbnail:
img = shooter.create('http://github.com/')#Write thumbnail to file:
File.open('thumbshot.png', 'w') {|f| f.write(img) }**Options for Thumbshooter class:**
**screen**
:screen => 'x'example:
:screen => '800x600'**resize**
:resize => 'x'scaling_option [optional]:
% - image will be resized proportionaly by percentage
# - image will be resized proportionaly by width
example:
:resize => '200x150'
:resize => '200x150#'
:resize => '80x50%'**crop**
:crop => 'x'scaling_option [optional]:
% - image will be cropped proportionaly by percentage
example:
:crop => '200x150'
:crop => '80x50%'important:
size of croped area is based on effect of previous process:
:screen if :resize is not set
:resize if :resize is set
croped area is always gravity center of imageTO-DO
=======Croping and resizing image should have more options, similar to "thoughtbot's Paperclip"(http://github.com/thoughtbot/paperclip) .
License
=======Copyright (c) 2009 Julian Kornberger | Digineo GmbH Germany
released under the GNU license