Avatar generation library for GO language

Overview

GOvatar

License GoDoc Build Status Coverage Status Go Report Card

GOvatar image

GOvatar is an avatar generation library written in GO

Install

To install the library and command-line program, use the following:

$ go get -u github.com/o1egl/govatar/...

Binary packages are available for Mac, Linux, and Windows.

Usage

    $ govatar generate male -o avatar.png                        # Generates random avatar.png for male
    $ govatar generate female -o avatar.png                      # Generates random avatar.png for female
    $ govatar generate male -u [email protected] -o avatar.png   # Generates avatar.png for specified username
    $ govatar -h                                                 # Display help message

As lib

Generates avatar and save it to filePath

    err := govatar.GenerateFile(govatar.MALE, "/path/to/avatar.jpg"
    err := govatar.GenerateFileFromUsername(govatar.MALE, "username", "/path/to/avatar.jpg")

Generates an avatar and returns it as an image.Image

    img, err := govatar.Generate(govatar.MALE)
    img, err := govatar.GenerateForUsername(govatar.MALE, "username")

Copyright, License & Contributors

Adding new skins

  1. Add new skins to the background, male/clothes, female/hair, etc...
  2. Run $ make assets for building embedded assets.
  3. Submit pull request :)

Submitting a Pull Request

  1. Fork it.
  2. Create a branch (git checkout -b my_branch)
  3. Commit your changes (git commit -am "Added new awesome avatars")
  4. Push to the branch (git push origin my_branch)
  5. Open a Pull Request
  6. Enjoy a refreshing Diet Coke and wait

GOvatar is released under the MIT license. See LICENSE

You might also like...
General purpose library for reading, writing and working with OpenStreetMap data

osm This package is a general purpose library for reading, writing and working with OpenStreetMap data in Go (golang). It has the ability to read OSM

S2 geometry library in Go

Overview S2 is a library for spherical geometry that aims to have the same robustness, flexibility, and performance as the best planar geometry librar

Go package for fast high-level image processing powered by libvips C library

bimg Small Go package for fast high-level image processing using libvips via C bindings, providing a simple programmatic API. bimg was designed to be

Image processing library and rendering toolkit for Go.

blend Image processing library and rendering toolkit for Go. (WIP) Installation: This library is compatible with Go1. go get github.com/phrozen/blend

Go bindings to OpenGL Utility Library

GLU This package offers minimal bindings for GLU functions. Usage go get github.com/go-gl-legacy/glu License Copyright 2012 The go-gl Authors. All ri

Go binding for the cairo graphics library

go-cairo Go binding for the cairo graphics library Based on Dethe Elza's version https://bitbucket.org/dethe/gocairo but significantly extended and up

A library for playing with colors in go (golang).
A library for playing with colors in go (golang).

go-colorful A library for playing with colors in Go. Supports Go 1.13 onwards. Why? I love games. I make games. I love detail and I get lost in detail

A lightning fast image processing and resizing library for Go

govips A lightning fast image processing and resizing library for Go This package wraps the core functionality of libvips image processing library by

This is old and unmaintained code, ignore it. starfish is a simple, SDL based, 2D graphics and user input library for Go. If you intend to work on it, please fork from the 'devel' branch, not 'master'. Current release: 0.12.0

What is starfish? What starfish is: starfish is a simple 2D graphics and user input library for Go built on SDL. What starfish is not: While it is bui

Comments
  • the govator.go was updated , but your README.md is not Synchronizing.

    the govator.go was updated , but your README.md is not Synchronizing.

    2021-10-25, I am using your govatar while found a little problem, GenerateFileFromUsername() was modified to GenerateFileForUsername() , the generatefilefromusername() method has been discarded .Can I join your contribution group and update the README.md, thank you very much.

    opened by ASWLaunchs 3
  • Generate avatar based on hash (feature-request)

    Generate avatar based on hash (feature-request)

    It would be nice to generate avatars based on hash (like gravatar). For example:

    govatar generate -hash [email protected] female
    

    The above could then generate an avatar based on the hash provided (like an email) so it would be the same avatar every time.

    Would be happy to provide a pull-request for this feature.

    BTW, great library and amazing artwork!

    enhancement 
    opened by srs 3
  • ignoring errors

    ignoring errors

    https://github.com/o1egl/govatar/blob/7b91520bc57a1281ff750d57c335e2c7acb053f2/govatar.go#L126 you're effectively ignoring any possible errors returned by other function calls here... the correct (albeit tedious) way to error check, would be to use one "if err != nil" per "err = ..." line

    opened by sug0 1
  • moved bindata.go to internal package

    moved bindata.go to internal package

    The go-bindata generated methods are public in the govatar lib package and pollute the godoc. This pull request puts the go-bindata data output in internal/bindata so the generated methods are not exposed.

    If you intended to expose those functions please ignore. Cool project!

    opened by notnil 1
Releases(v0.4.1)
Owner
Oleg Lobanov
Oleg Lobanov
A generator of cats/birds/mobilizon pictures optimised to generate or random avatars, or defined avatar from a "seed"

A generator of cats/birds/mobilizon pictures optimised to generate or random avatars, or defined avatar from a "seed". A derivation by David Revoy from the original MonsterID by Andreas Gohr's.

Tam Le 1 Feb 7, 2022
Go Language Library for SVG generation

SVGo: A Go library for SVG generation The library generates SVG as defined by the Scalable Vector Graphics 1.1 Specification (http://www.w3.org/TR/SVG

Anthony Starks 2k Jan 6, 2023
A Go-language library for the automatic generation of image collages.

CollageCreator is a Go-language library for the automatic generation of image collages.

August Schwerdfeger 0 Jan 29, 2022
Dendrite is a second-generation Matrix homeserver written in Go!

Dendrite Dendrite is a second-generation Matrix homeserver written in Go. It intends to provide an efficient, reliable and scalable alternative to Syn

matrix.org 4.2k Jan 8, 2023
Go package captcha implements generation and verification of image and audio CAPTCHAs.

Package captcha ⚠️ Warning: this captcha can be broken by advanced OCR captcha breaking algorithms. import "github.com/dchest/captcha" Package captch

Dmitry Chestnykh 1.7k Dec 30, 2022
Procedural texture generation package.

Texture Generation A package for the procedural generation of textures. Based on the ideas contained in the Bryce 3D deep texture editor. More example

null 17 Sep 8, 2022
Vulkan API bindings for Go programming language

Golang Bindings for Vulkan API Package vulkan provides Go bindings for Vulkan — a low-overhead, cross-platform 3D graphics and compute API. Updated Oc

null 665 Jan 3, 2023
The android-go project provides a platform for writing native Android apps in Go programming language.

android-go The android-go project aims to provide a platform (namely an SDK) for writing native Android apps in Go programming language. All things he

Max Kupriianov 984 Jan 5, 2023
Image resizing for the Go programming language with common interpolation methods

This package is no longer being updated! Please look for alternatives if that bothers you. Resize Image resizing for the Go programming language with

null 1 Dec 14, 2021
geoserver is a Go library for manipulating a GeoServer instance via the GeoServer REST API.

Geoserver geoserver Is a Go Package For Manipulating a GeoServer Instance via the GeoServer REST API. How to install: go get -v gopkg.in/hishamkaram/g

Hisham waleed karam 78 Dec 22, 2022