2022-04-24 14:24:54 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "image/jpeg"
|
|
|
|
_ "image/png"
|
2022-05-01 21:30:35 +02:00
|
|
|
"io/ioutil"
|
|
|
|
"log"
|
2022-05-02 20:29:22 +02:00
|
|
|
"math/rand"
|
2022-04-24 14:24:54 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2022-05-01 21:30:35 +02:00
|
|
|
// store command line arguments into the register
|
|
|
|
initConfigRegister()
|
2022-04-26 13:51:49 +02:00
|
|
|
|
2022-05-01 21:30:35 +02:00
|
|
|
if ConfigRegister.Quiet {
|
|
|
|
log.SetOutput(ioutil.Discard)
|
|
|
|
|
|
|
|
}
|
2022-05-01 15:33:55 +02:00
|
|
|
|
2022-05-02 20:29:22 +02:00
|
|
|
// init RNG
|
|
|
|
rand.Seed(ConfigRegister.Seed)
|
|
|
|
log.Println("Seed :", ConfigRegister.Seed)
|
|
|
|
|
2022-04-26 13:51:49 +02:00
|
|
|
// pool of workers unionizing, ready to blend a new picture using the power of friendship
|
2022-04-24 19:20:08 +02:00
|
|
|
var pool blendWorkerPool
|
2022-04-24 14:24:54 +02:00
|
|
|
|
2022-05-01 21:30:35 +02:00
|
|
|
// launch main blending routine
|
2022-05-01 20:52:03 +02:00
|
|
|
pool.BlendImagesMain()
|
2022-04-24 14:24:54 +02:00
|
|
|
}
|