示例#1
0
func NearestNeighbor(c config.Config) ColorStrategy {
	imageSize := 1 << uint(((c.ColorCubeBitSize + c.ColorCubeBitSize + c.ColorCubeBitSize) / 2))
	surface := workSurface.New(imageSize)
	fileName := c.OutputFilename
	cube := colorCube.New(uint8(c.ColorCubeBitSize))
	return nearestNeighborStrategy{list.New(), color.RGBA{255, 255, 255, 255}, surface, fileName, cube}
}
示例#2
0
func Iterator(c config.Config) ColorStrategy {
	var s iteratorStrategy
	s.fileName = c.OutputFilename
	s.cube = colorCube.New(uint8(c.ColorCubeBitSize))
	return s
}
示例#3
0
func Random(c config.Config) ColorStrategy {
	var s randomImageStrategy
	s.fileName = c.OutputFilename
	s.cube = colorCube.New(uint8(c.ColorCubeBitSize))
	return s
}