Git Product home page Git Product logo

hello_avatar's Introduction

hello_avatar

轻松搭建生成简易头像的api服务

安装

docker-compose.yml

version: '3'
services:
  hello_avatar:
    image: dreamplay/hello_avatar
    ports:
      - 13130:13130

运行

docker-compose up -d

使用

访问示例页面

http://localhost:13130/

访问接口:

http://localhost:13130/avatar

接口将返回png图片内容,尺寸为500*500

参数控制:

字段 是否必填 类型 简介
type string 生成头像类型,
ugly-avatar-丑头像(默认),参考:https://github.com/txstc55/ugly-avatar
multiavatar-插画头像,参考:https://multiavatar.com/
jdenticon-随机头像,参考:https://jdenticon.com/icon-designer.html
dicebear-风格头像,参考:https://www.dicebear.com/styles/
style string 风格类型,仅当type=dicebear时有效
male-男性风格
female-女性风格
avataaars-由Avataaars设计的头像
bottts-像素机器人
gridy-棋盘格式风格
human-贴近真实人类样貌
identicon-GitHub使用的Identicons风格的头像
initials-显示用户初始字母的简单风格
seed string 头像生成种子变量,仅当type=dicebear且style=initials时有效

参考图片

type=ugly-avatar

type=multiavatar

type=jdenticon

type=dicebear

风格类型+种子变量 male female avataaars bottts gridy human identicon initials+测试
示例

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.