Fun with UI Avatars

I came across https://ui-avatars.com, a web service that creates avatar images based on some parameters.

From Pharo, the shortest invocation would be something like
Making use of the full builder interface of ZnClient that would look more like
ZnClient new
https;
host: ‘ui-avatars.com‘;
addPath: #api;
queryAt: #name put: ‘Albert Einstein’;
queryAt: #size put: 128;
queryAt: #color put: ‘FFF’;
queryAt: #background put: ‘0D8ABC’;
queryAt: #rounded put: true;
accept: ZnMimeType imagePng;
enforceHttpSuccess: true;
enforceAcceptContentType: true;
contentReader: [ :entity | ImageReadWriter formFromStream: entity readStream ];
beOneShot;
get.
Anyway, it is cool to have an environment that makes this kind of experimentation so much fun.
It is probably easy to implement this avatar image generation directly in Pharo …
Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: