29 lines
1.1 KiB
Go
29 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
_ "image/jpeg"
|
|
_ "image/png"
|
|
)
|
|
|
|
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.InputDir, "input", "/home/gator/Photos", "Input directory. Where to look the images from")
|
|
flag.StringVar(&ConfigRegister.BaseImage, "base-img", "", "Path to the base image to work with. Random image if not set")
|
|
flag.StringVar(&ConfigRegister.Dimensions, "dimensions", "1280x1024", "Out image dimensions. <width>x<height>")
|
|
flag.BoolVar(&ConfigRegister.Grayscale, "grayscale", false, "Output image in shade of gray (around 50)")
|
|
flag.IntVar(&ConfigRegister.Amount, "amount", 2, "Number of images to blend together")
|
|
flag.Parse()
|
|
|
|
// set output's width and height
|
|
ConfigRegister.SetOutputDimensions()
|
|
|
|
// pool of workers unionizing, ready to blend a new picture using the power of friendship
|
|
var pool blendWorkerPool
|
|
|
|
// main blending routine
|
|
pool.BlendImagesMain()
|
|
}
|