pixelweaver/main.go

27 lines
634 B
Go
Raw Normal View History

2022-04-24 14:24:54 +02:00
package main
import (
"flag"
2022-04-24 14:24:54 +02:00
_ "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.Parse()
2022-04-24 14:24:54 +02:00
// get two random images and load them
imgs := getRandomImages(2)
img1 := loadImage(imgs[0])
img2 := loadImage(imgs[1])
2022-04-24 14:24:54 +02:00
// pool of workers unionizing, ready to blend a new picture using the power of friendship
var pool blendWorkerPool
pool.InitWorkerPool()
2022-04-24 14:24:54 +02:00
// main blending routine
pool.BlendImages(img1, img2)
2022-04-24 14:24:54 +02:00
}