avatar-generator

8bit avatar generator. Inspired by https://github.com/matveyco/8biticon

avatar-generator

8bit avatar generator like one below.

Inspired by https://github.com/matveyco/8biticon (icons also theirs). Generate same icons for same ids like gravatar, Use email or md5 or any string for generating and get the same avatar.

http://eightbitavatar.herokuapp.com/?id=userid&s=male&size=400

Where: id - your user id s - sex (male|female) size - avatar size

Install the module with: npm install avatar-generator

var avatar-generator = require('avatar-generator');
avatar.generate('User ID (email or hash or any string)', 'male|female', 400).stream().pipe(stream);

Install with cli command

$ npm install -g avatar-generator
$ avatar-generator --help
$ avatar-generator --version

Project uses imagemagick so make sure it's installed and available in $PATH. You can customize path to imagemagick convert command using settings.js

module.exports = {
  order:'background face clothes head hair eye mouth'.split(' '), //order in which sprites should be combined 
  images:require('path').join(__dirname,'./img'), // path to sprites  
  convert:'convert' //Path to imagemagick convert  
};

Generator uses avatars layers in img You can easily add your own if you want.

see example/file_example.js and example/webserver-exapmle.js

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Copyright (c) 2014 Alex R
Licensed under the MIT license.