base image + skeleton for loading config file
This commit is contained in:
10
main.go
10
main.go
@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"image"
|
||||
_ "image/jpeg"
|
||||
_ "image/png"
|
||||
)
|
||||
@ -10,10 +11,17 @@ func main() {
|
||||
// command line arguments
|
||||
flag.StringVar(&ConfigRegister.Method, "blending", "darken", "Blending methods : darken, lighten, fuckyfun")
|
||||
flag.StringVar(&ConfigRegister.OutputDir, "output", "./", "Output directory")
|
||||
flag.StringVar(&ConfigRegister.BaseImage, "base-img", "", "Path to the base image to work with. Random image if not set")
|
||||
flag.Parse()
|
||||
|
||||
// get two random images and load them
|
||||
img1 := loadImage(getRandomImage())
|
||||
var img1 image.Image
|
||||
if ConfigRegister.BaseImage != "" {
|
||||
img1 = loadImage(ConfigRegister.BaseImage)
|
||||
} else {
|
||||
img1 = loadImage(getRandomImage())
|
||||
}
|
||||
|
||||
img2 := loadImage(getRandomImage())
|
||||
|
||||
// pool of workers unionizing, ready to blend a new picture using the power of friendship
|
||||
|
||||
Reference in New Issue
Block a user