yzalis / identicon Goto Github PK
View Code? Open in Web Editor NEWGenerate awesome and unique identicons with beautiful colors
License: MIT License
Generate awesome and unique identicons with beautiful colors
License: MIT License
The parameters $color
and $backgroundColor
are typehinted as string
, while they also take an RGB array. The @param
annotation should be changed to string|array
.
Would you be able to add imagemagick support so we can choose between using imagick and gd? 😄
identicon-php.org don't want to response...
I'm using Laravel framework
As you can see from the title I want to show the identicon image but i just get some binary data on screen
What do I have to do? Can you guys help me?
public function Identicon(Request $request, $string)
{
$identicon = new Identicon();
return $identicon->displayImage(md5($string), 100);
}
add margin to identicon
The constructor of Identicon\Identicon
is missing a typehint for Identicon\Generator\GeneratorInterface
.
If github account creation were to preview identicon some seemingly tragic patterns could be avoided
Like github user ToEatFreshBabies having a menacing grin. Methinks s/he fiddled with preview to attain the result
Hello.
How can I increase the number of squares for an image?
Currently it's 5 x 5.
I would like to have more!
I don't think I'm good enough to succeed by modifying the source code on my own.
Could this be an interesting new feature to add to parameters like "size"?
如题
??
use Identicon\Identicon;
$identicon = new Identicon();
$identicon->getImageData("8434429e38517775e9cad5341c69a0cf", 20)
Result is:
https://user-images.githubusercontent.com/1456669/40297276-ec61a5ce-5ce7-11e8-81e4-d6b0a959accc.png
Whoops, looks like something went wrong.
when i search i found that
the line 15 should be like that
if (!extension_loaded('gd') && !extension_loaded('ext-gd') ) {
cause herku work with ext-gd can you fi that cause heroku install your repo automatically i cant change it by my one thanx
I find a bug about these lines of code(BaseGenerator.php):
foreach ($chars[1] as $i => $char) {
if ($i % 3 == 0) {
$this->arrayOfSquare[$i/3][0] = $this->convertHexaToBoolean($char);
$this->arrayOfSquare[$i/3][4] = $this->convertHexaToBoolean($char);
} elseif ($i % 3 == 1) {
$this->arrayOfSquare[$i/3][1] = $this->convertHexaToBoolean($char);
$this->arrayOfSquare[$i/3][3] = $this->convertHexaToBoolean($char);
} else {
$this->arrayOfSquare[$i/3][2] = $this->convertHexaToBoolean($char);
}
ksort($this->arrayOfSquare[$i/3]);
}
the length of $char is 16, when $i is 15, $i / 3 is 5, which is not correct, because the size of matrix is 5, the max value of $i must be smaller than 5.
Hi,
I would like to extract the color generated by
$identicon->getImageDataUri('myString');
I can see it here :
// var_dump($identicon)
object(Identicon\Identicon)[166]
private 'generator' =>
object(Identicon\Generator\GdGenerator)[175]
{...}
protected 'color' =>
array (size=3)
0 => int 64
1 => int 112
2 => int 48
But can't use
$identicon->generator->getColor();
because of 'private' generator property.
I have original values and already built hashes, both should result in the same identicon. Do I have to hash all hashes again? Or is there a solution for this (without changing setString($string)
for myself)?
Best regards
Could you please tag a release so that we can target a specific release in composer?
Tnx!
I followed your directions, however the class was not autoloaded. I had to do a
require_once('./vendor/yzalis/identicon/src/Identicon/Identicon.php');
for the class to load.
Can you tag a new version with the merged feature? The official 1.1 is from 2014..
Thanks
Hi,
Is there a method to save the identicon to disk as image once it is created?
Thanks
Can't get the Base64 URI's/strings to work.
Just shows the "broken img" icon whatever I put as the text value in getImageDataUri()
What happened to the Supervisor Symfony Bundle repo? I used this bundle for quite sometime, i redeployed my site earlier and got a git error about the repo. Github shows 404 for repo as well. Here is the link to the repository I'm referring to: https://github.com/yzalis/SupervisorBundle
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.