Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plusmancn/canvas-server
字符头像生成
https://github.com/plusmancn/canvas-server
Last synced: about 1 month ago
JSON representation
字符头像生成
- Host: GitHub
- URL: https://github.com/plusmancn/canvas-server
- Owner: plusmancn
- License: mit
- Created: 2015-07-06T03:51:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-11T13:51:28.000Z (over 9 years ago)
- Last Synced: 2024-10-15T01:42:58.440Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 7.63 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# canvas-server
> 字符头像生成,背后不是 node-canvas 驱动,canvas很美好,可我没法解决中文问题,最后是 [gm](https://github.com/aheckmann/gm) 在驱动图形处理。## Usage
**如何运行?**
```javascript
node ./server.js
```**API开放接口**
```javascript
// GET 请求方式
http://character-image.plusman.cn/CharacterImage/:character// 参数说明
:character 单字符,传参数时对参数做一层,encodeURIComponent 编码。// 示例
http://character-image.plusman.cn/CharacterImage/%E4%B8%9C// return JSON
{
"code": 0,
"message": "success",
"data": {
"hash": "from_cached",
"key": "东.png",
"url": "http://7xk6mk.com1.z0.glb.clouddn.com/%E4%B8%9C.png"
}
}```
**效果图**
![会](http://7xk6mk.com1.z0.glb.clouddn.com/会.png)
![友](http://7xk6mk.com1.z0.glb.clouddn.com/友.png)
![行](http://7xk6mk.com1.z0.glb.clouddn.com/行.png)
![G](http://7xk6mk.com1.z0.glb.clouddn.com/G.png)## License
(The MIT License)
Copyright (c) 2015 [plusmancn]([email protected])
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.