opekunov / stylish-avatar-generator
Generate fun avatar by text seed
Fund package maintenance!
Patreon
v0.03
2020-11-04 16:20 UTC
Requires
- php: >=7.1
- intervention/image: ^2.5
This package is auto-updated.
Last update: 2024-12-05 01:44:07 UTC
README
Generates cartoon avatars by seed
Install
composer require opekunov/stylish-avatar-generator
DEMO
Usage
//set TRUE for use Imagik
$manager = new FancyAvatarGenerator(true);
//Seed can be NULL, then it will be generated automatically
$seed = 'ohMySeed';
//Avatar style. Now support only 'flamenko'
$style = 'flamenko';
/**
* @var \Intervention\Image\Image $avatar
*/
$avatar = $manager->generateFace($seed, 'flamenko');
//Show as image
echo $avatar->response('jpg', 95);
//...or save
$avatar->save('your/path/filename', 95, 'jpg');
TODO
- Refactoring
- Change fixed size
- Add more styles
- Add more elements for styles