Skip to content
a small golang lib to generate placeholder images
Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example update README Oct 14, 2014
service Webservice: Return 413 when requesting too large image. Jan 17, 2016
.gitignore Initial commit Oct 12, 2014
LICENSE Initial commit Oct 12, 2014
README.md update README Oct 17, 2014
goplaceholder.go license header, doc Oct 14, 2014

README.md

goplaceholder

a small golang lib to generate placeholder images.

Usage

get it

$ go get github.com/michiwend/goplaceholder

simple example

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

Webservice

You can try it as a web service at placeholder.michiwend.com.

The following requests are allowed:

  • /800x600.png
  • /800x600.png?text=foo
  • /500.png
  • /500.png?text=foo
You can’t perform that action at this time.