swdyh / quilt
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (2)
- Wiki (1)
- Graphs
-
Tag:
0.0.3
commit 504c3aee7df8f135bb0fad83f3c18eaf498b9966
tree e415a53d71f7f7a18736839168b5cb292f967b21
parent ce5cb6d7cc9a804df7bfbc56e68cc88ee1d0ea08
tree e415a53d71f7f7a18736839168b5cb292f967b21
parent ce5cb6d7cc9a804df7bfbc56e68cc88ee1d0ea08
quilt /
| name | age | message | |
|---|---|---|---|
| |
ChangeLog | Thu Jun 19 05:26:46 -0700 2008 | |
| |
MIT-LICENSE | Sat May 10 03:43:57 -0700 2008 | |
| |
README.rdoc | Sun Jun 15 06:51:01 -0700 2008 | |
| |
Rakefile | Fri Sep 19 05:28:47 -0700 2008 | |
| |
lib/ | Fri Sep 19 05:15:44 -0700 2008 | |
| |
quilt.gemspec | Fri Sep 19 05:28:20 -0700 2008 | |
| |
test/ | Sun Jun 08 04:53:27 -0700 2008 |
README.rdoc
quilt
Description
a library for generating identicon.
Identicon: en.wikipedia.org/wiki/Identicon
Installation
Required RMagick or ruby-gd.
Archive Installation
rake install
Gem Installation
gem install quilt
Features/Problems
- Output file type is PNG only.
Synopsis
# input: any string
# output: 15 * 15 png (default)
identicon = Quilt::Identicon.new 'sample'
identicon.write 'sample15_15.png'
# input: identicon code(32 bit integer)
# output: 15 * 15 png (default)
identicon = Quilt::Identicon.new 1, :type => :code
identicon.write 'sample15_15_code.png'
# input: ip address
identicon = Quilt::Identicon.new '100.100.100.100', :type => :ip
identicon.write 'sample15_15_ip.png'
# output: 150 * 150 png
identicon = Quilt::Identicon.new 'sample', :scale => 10
identicon.write 'sample150_150.png'
# output: blob
identicon = Quilt::Identicon.new 'sample'
print identicon.to_blob
# change image library to Rmagick to GD
Quilt::Identicon.image_lib = Quilt::ImageGD
identicon = Quilt::Identicon.new 'sample'
identicon.write 'sample15_15_gd.png'
Copyright
| Author: | swdyh <youhei@gmail.com> |
| Copyright: | Copyright © 2008 swdyh |
| License: | The MIT License |
