Merge branch 'master' into split

This commit is contained in:
6543 2021-02-02 02:49:09 +01:00
commit f54832885c
No known key found for this signature in database
GPG Key ID: C99B82E40B027BAE
2 changed files with 18 additions and 6 deletions

View File

@ -1,10 +1,12 @@
# Golang port of DiceBear Avatars, which in turn were inspired by 8biticon avatars
# Golang port of DiceBear Avatars
which in turn were inspired by 8biticon avatars
![Example images](mosaic.png)
## Usage
import `codeberg.org/Codeberg/avatars`
and use `string svg = avatars.MakeAvatar(seed)`
import `codeberg.org/Codeberg/avatars` & use `string svg = avatars.MakeAvatar(seed)`
## Build & Use Example
@ -13,8 +15,18 @@ and use `string svg = avatars.MakeAvatar(seed)`
go build -o avatars example/main.go
# Create a random avatar and write it to /tmp/avatar.svg
./avatars my-special-seed-string > /tmp/avatar.svg
# Open SVG file with default image viewer
xdg-open /tmp/avatar.svg
# Open SVG file with image viewer
eog /tmp/avatar.svg
```
## Create mosaic with example images using rsvg and imagemagick montage
```shell
go build -o avatars example/main.go
for i in {1..40} ; do
./avatars 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
```

BIN
mosaic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 KiB