From 605de4ae2029abdb82b82532040c87029229223c Mon Sep 17 00:00:00 2001 From: Codeberg Date: Tue, 2 Feb 2021 02:29:42 +0100 Subject: [PATCH] mosaic example --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 74b8ad1..8b7c68e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Golang port of DiceBear Avatars, which in turn were inspired by 8biticon avatars +![Example images](mosaic.png) + ## Build & Run ```shell @@ -8,7 +10,19 @@ make BUILDDIR=$PWD # Create a random avatar and write it to /tmp/avatar.svg $PWD/gitea/bin/avatar my-special-seed-string > /tmp/avatar.svg # Open SVG file with default image viewer -xdg-open /tmp/avatar.svg +eog /tmp/avatar.svg ``` +## Create mosaic with example images using rsvg and imagemagick montage + +```shell +make BUILDDIR=$PWD +for i in {1..40} ; do + $PWD/gitea/bin/avatar my-special-seed-string_$i > /tmp/avatar_$i.svg + rsvg-convert /tmp/avatar_$i.svg -z 10 -o /tmp/avatar_$i.png +done +montage -tile 10x4 /tmp/avatar_*.png /tmp/mosaic.png +eog /tmp/mosaic.png +``` +