How to create kaleidoscopic images such as the default avatars here in SO?

How can I create kaleidoscopic images such as the default avatars here in SO using PHP?

+3
source share
3 answers

I am sure that the images created by default are actually generated by the gravitator, more about this here: http://en.gravatar.com/site/implement/images/

According to them, they use an "identifier", which is actually based on email.

http://scott.sherrillmix.com/blog/blogger/wp_identicon/

You can take a look at this code and see how it is generated :)

+3
source

Imagemagick php.
: http://www.imagemagick.org/Usage/distorts/ script: http://www.fmwconcepts.com/imagemagick/kaleidoscope/index.php

.

. - (bash, php):

$ mkkal='dx=i-50; dy=j-50; rad=hypot(dx,dy); tt=mod((atan2(dy,dx)+6.28319+0)*5/(6.28319),1.0); ang=2*(tt<0.5?tt:1-tt); u.p{50+rad*cos(ang),50+rad*sin(ang)}'
$ convert -size 100x100 pattern:checkerboard -distort Barrel '-0.2 -3.0 0.2 1.3' -fx "$mkkal" tile.png
$ display tile.png

Barrel , .

enter image description here

+2

Source: https://habr.com/ru/post/1795555/


All Articles