What is an avatar?An avatar is an image identifier generated uniquely for draw each commentator on a blog so that users associate the various comments. To do this can be taken into account the IP address, but by doing so we would have different avatars for the same user who comments in two sessions (with different IP), separated, or email address. |
This image uniquely identifies a user, some sites allow for registration and the inclusion of an avatar precisely. This necessarily leads to the interference in order to post a comment you must first have made a recording. The way to fix this problem exists and is very simple. There are some sites, the best known is Gravatar that allows you to associate an image to a hash. The hash can be calculated from the email address of the user while the image may be a Identicon, or MonsterID Wavatar as shown in Fig.
Identicon | MonsterID | Wavatar |
The use of this technique also has the advantage of leaving the anonymous commentator, even if the avatar was created according to his e-mail is impossible to go back to your email address. This is ensured by the fact that there is an inverse function of the hash.
SignID
Assuming that an avatar has the same function as a signature very cryptic, I wanted to create another type of avatar like a real signature short. The procedure is much simpler than the previous ones, because he knows the same features the easiest way is always to be preferred as we are taught Occam.
The idea is very simple, we consider the image as if it were a Cartesian plane and split the hash into a set of coordinates. For example, if we can draw on our plane 261d832de29d0923db96989c4640dfdd the following points: (2.6), (1, D), (8.3), (2, D), ... with the coordinates expressed in hexadecimal. We got a series of points, we just have to put them together with lines and here we can see a beautiful SignID in this figure.
SignID
How to use SignID
You can use SignID as an alternative to more famous avatars. Given an email address, for example mail@example.com the first thing to do is to compute the hash value of the address, you can use the functions available to the language you are using as the 'md5. 333a3587d4c6757b04c86b47fbafc64a The URI of 'avatars will SignID http://www.piumalab.org/avatar/333a3587d4c6757b04c86b47fbafc64a
For those who want to enter a SignID your site in PHP is simply the following code
( ( string ) md5 ( $email ) ) ?> " /> <Img src = "http://www.piumalab.org/avatar/ <? Php echo ((string) md5 ($ email))?>" />
Attributes to customize SignID
All these attributes are optional, which I will talk, you can specify the size parameter s, if not specified default is 80 pixels, for example: http://www.piumalab.org/avatar/333a3587d4c6757b04c86b47fbafc64a?s=256
The default image format is PNG just specify if you want a gif format = gif http://www.piumalab.org/avatar/333a3587d4c6757b04c86b47fbafc64a?format=gif
There are three parameters to specify colors. They bg, lc and pc respectively which serve to define the background color, lines and points. The format of the color must be expressed as 6 hexadecimal digits, according to the form RGB, 2 for red, green and 2 for 2 for blue. All options can be combined as desired. here is an example of these three options http://www.piumalab.org/avatar/333a3587d4c6757b04c86b47fbafc64a?bg=99DD33&lc=234567&pc=FF55FF



I really like it, bravo!