Created
February 1, 2016 16:08
-
-
Save vitkarpov/93c5402e6e83e55c4275 to your computer and use it in GitHub Desktop.
Lorempixum CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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