Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deissh/avagen
Generate avatars with initials from names.
https://github.com/deissh/avagen
avatar-generator avatar-service generator golang high-performance image-processing
Last synced: 3 months ago
JSON representation
Generate avatars with initials from names.
- Host: GitHub
- URL: https://github.com/deissh/avagen
- Owner: deissh
- License: mit
- Created: 2019-04-10T05:01:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T02:34:28.000Z (over 1 year ago)
- Last Synced: 2024-06-28T06:37:17.351Z (5 months ago)
- Topics: avatar-generator, avatar-service, generator, golang, high-performance, image-processing
- Language: Go
- Homepage:
- Size: 19.2 MB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Avagen
```bash
$ avagen g "Fist Second" > image.png
$ avagen g "Fist Second" --type jpeg > image.jpeg
$ avagen g "Fist Second" --plugin identicon> image.png# simple avatar server
$ avagen serve
$ avagen serve --addr 0.0.0.0:8080
# request
$ curl --output avatar.png http://0.0.0.0:8080?name=Avagen
$ curl --output avatar.png http://0.0.0.0:8080?name=Best&size=512&fsize=200
$ curl --output avatar.png http://0.0.0.0:8080?name=Example%20With%20Type&type=jpeg
``````go
package mainimport (
"github.com/deissh/avagen/app"
// load plugins
_ "github.com/deissh/avagen/plugins/identicon"
"log"
"os"
)func main() {
plugin, _ := app.GetPlugin("identicon")bytes, err := plugin.Generate(app.ParsedArg{"name": "Я R", "type": "png"})
if err != nil {
log.Fatal(err)
}f, err := os.Create("hello-go.png")
f.Write(bytes)
f.Close()
}```