Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codeberg.org/Codeberg/avatars.git

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codeberg.org/Codeberg/avatars.git

  • v1.0.0
  • Go
  • Socket score

Version published
Created
Source

Golang port of DiceBear Avatars

which in turn were inspired by 8biticon avatars

Example images

Usage

import codeberg.org/Codeberg/avatars & use string svg = avatars.MakeAvatar(seed)

Build & Use Example

# will build the binary
go build -o avatars example/main.go
# Create a random avatar and write it to /tmp/avatar.svg. Note that for the same seed string always the same image will be generated.
./avatars my-special-seed-string > /tmp/avatar.svg
# Open SVG file with image viewer
eog /tmp/avatar.svg

Create mosaic with example images using rsvg and imagemagick montage

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

FAQs

Package last updated on 28 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc