2012-08-01 08:13:46 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2012-08-02 15:46:05 -07:00
|
|
|
"gotour-notes/genimage/pic"
|
2012-08-01 08:13:46 -07:00
|
|
|
"flag"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Pic(dx, dy int) [][]uint8 {
|
|
|
|
result := make([][]uint8, dy)
|
|
|
|
var ii, jj uint8
|
2012-08-02 14:04:07 -07:00
|
|
|
for j := 0; j < dy; j++ {
|
|
|
|
result[j] = make([]uint8, dx)
|
|
|
|
for i := 0; i < dx; i++ {
|
2012-08-01 08:13:46 -07:00
|
|
|
ii = uint8(i)
|
|
|
|
jj = uint8(j)
|
2012-08-02 14:04:07 -07:00
|
|
|
result[j][i] = ii ^ jj
|
2012-08-01 08:13:46 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
flag.Parse()
|
|
|
|
image := pic.CalculateImage(Pic)
|
|
|
|
pic.SaveImage(flag.Arg(0), image)
|
|
|
|
}
|