Fun with UI Avatars

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Fun with UI Avatars

Sven Van Caekenberghe-2
I came across, 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
  host: '';
  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 ];

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 ...