Skip to content

johnnyhalife/avatar-generator.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Initials Avatar Generator

A small Sinatra app influenced by http://dummyimage.com, and the original source code from XXX's Fake Image but written in Ruby.

Try it online at http://avatar-generator.herokuapp.com/200x200

Installation

requires 1.9.2 (YARV)

bundle install 
unicorn (or your rack-app-handler of choice)

and it's Heroku deployment ready!

	heroku create my-app 
	git push heroku master

Usage

In a browser, hit http://localhost:8080/300x200 for example and you will get an image like

300x200

You can get fancier http://localhost:8080/300x200/ff0066/fff by specifying hex color for background and foreground to get something like

300x200 Background

Want to get like Gmail's new default avatar with initials, you can do http://localhost:8080/120x120/ff0066/fff?text=johnny%20halife

120x120 Initials Mode

Want the full text get like Gmail's new default avatar with initials, you can do http://localhost:8080/300x200/ff0066/fff?text=Johnny%20Halife&mode=full

120x120 Full Mode

Want GIF or JPG instead? Try with the custom format!

http://localhost:8080/300x200/ff0066/fff.gif?text=Johnny%20Halife&mode=full

http://localhost:8080/300x200/ff0066/fff.jpg?text=Johnny%20Halife&mode=full

Want it square? No problem, just specify one dimention

Notes

It requires ImageMagick

Copyright

Copyright (c) 2013 Johnny Halife and Mural.ly Dev Team, released under the MIT license.

The included Droid Sans font is licensed under the Apache License, online at http://www.apache.org/licenses/LICENSE-2.0.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages