2022-04-24 19:20:08 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2022-05-01 20:52:03 +02:00
|
|
|
"image"
|
2022-05-01 09:07:46 +02:00
|
|
|
"testing"
|
2022-04-24 19:20:08 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(t *testing.T) {
|
|
|
|
img1 := loadImage("assets/moutons.jpg")
|
|
|
|
img2 := loadImage("assets/lavande.jpg")
|
2022-05-01 20:52:03 +02:00
|
|
|
dimensions := dimensionsToRectangle(800, 600)
|
|
|
|
outImg := image.NewRGBA(dimensions)
|
2022-04-24 19:20:08 +02:00
|
|
|
|
|
|
|
var pool blendWorkerPool
|
|
|
|
|
|
|
|
pool.InitWorkerPool()
|
|
|
|
|
2022-05-01 20:52:03 +02:00
|
|
|
pool.BlendImages(img1, img2, outImg)
|
|
|
|
|
|
|
|
encodeImage(outImg)
|
2022-04-24 19:20:08 +02:00
|
|
|
}
|