11
identicon
identicon
SYNOPSIS
identicon($name, $size=48)
DESCRIPTION
identicon retourne le PNG d'un image carrée unique de $size pixels générée à partir de $name.
CODE
PHP Identicons sur SourceForge.
EXAMPLE
- define('AVATAR_SIZE', 24);
- define('AVATARS_DIR', ROOT_DIR . DIRECTORY_SEPARATOR . 'avatars');
- function user_create_avatar($name) {
- require_once 'identicon.php';
- $img=identicon($name, AVATAR_SIZE);
- $r = imagepng($img, AVATARS_DIR . DIRECTORY_SEPARATOR . $name . '.png');
- return $r;
- }
izend
Commentaires