Ratings | | Unique User Downloads | | Download Rankings |
Not enough user ratings | | Total: 99 | | All time: 9,472 This week: 253 |
|
Description | | Author |
This class can generate an identicon image for a text string.
It can take a given text string as parameters and generates an image that represents that text using identicon patterns.
Details like the colors, number of blocks and image size are configurable parameters.
The class generates an data URL that can be used in HTML image tags to embed the image directly in the HTML code of the pages. | |
|
|
Innovation award
Nominee: 4x |
|
Details
PHP Identicon
Identicon is a library which generate an identicon image based on a string.
Requirement
install
run this command
## usage
<?php
use Lablnet\Identicon;
require '../vendor/autoload.php';
$Identicon = new Identicon;
//$Identicon->getInstance()->setBlock(2); //change block
$imageDataUri = $Identicon->getImgDataBase64('php');
echo "<img src=".$imageDataUri." />";
## Change Size , color and background
<?php
use Lablnet\Identicon;
require '../vendor/autoload.php';
$Identicon = new Identicon;
//$Identicon->getInstance()->setBlock(2); //change block
string | size | foreground | background
$imageDataUri = $Identicon->getImgDataBase64('php',1000,'#fff','#dad');
echo "<img src=".$imageDataUri." />";
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.