Skip to content

Instantly share code, notes, and snippets.

@vitkarpov
Created February 1, 2016 16:08
Show Gist options
  • Save vitkarpov/93c5402e6e83e55c4275 to your computer and use it in GitHub Desktop.
Save vitkarpov/93c5402e6e83e55c4275 to your computer and use it in GitHub Desktop.
Lorempixum CLI
package main
import (
"flag"
"github.com/vitkarpov/lorempixum"
"os"
)
func main() {
w := flag.Int("width", 0);
h := flag.Int("height", 0);
flag.Parse();
// get the pointer to the image
img := lorempixum.GetImage(*w, *h)
// stream it to the standart output
lorempixum.StreamImage(os.Stdout, img, "jpeg")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment