Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michiwend/goplaceholder
a small golang lib to generate placeholder images
https://github.com/michiwend/goplaceholder
Last synced: 25 days ago
JSON representation
a small golang lib to generate placeholder images
- Host: GitHub
- URL: https://github.com/michiwend/goplaceholder
- Owner: michiwend
- License: mit
- Created: 2014-10-12T00:50:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-17T18:24:14.000Z (almost 9 years ago)
- Last Synced: 2024-08-03T15:06:08.932Z (3 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 29
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - goplaceholder - a small golang lib to generate placeholder images - ★ 20 (Utilities)
- awesome-go-extra - goplaceholder - 10-12T00:50:46Z|2016-01-17T18:24:14Z| (Utilities / Fail injection)
README
goplaceholder
=============
a small golang lib to generate placeholder images.## Usage
get it
```
$ go get github.com/michiwend/goplaceholder
```simple example
```Go
placeholder, err := goplaceholder.Placeholder(
"Lorem ipsum!",
"/usr/share/fonts/TTF/DejaVuSans-Bold.ttf",
color.RGBA{150, 150, 150, 255},
color.RGBA{204, 204, 204, 255},
400, 200)
```results in
![example placeholder](example/lorem.png)
## Webservice
You can try it as a web service at
[placeholder.michiwend.com](http://placeholder.michiwend.com/400x300.png?text=lorem%20ipsum!).The following requests are allowed:
* /800x600.png
* /800x600.png?text=foo
* /500.png
* /500.png?text=foo