fixed error with image generation
This commit is contained in:
parent
e99ca5c8fa
commit
bdc7a5c44a
@ -7,15 +7,13 @@ import (
|
||||
|
||||
func Pic(dx, dy int) [][]uint8 {
|
||||
result := make([][]uint8, dy)
|
||||
for i := 0; i < dx; i++ {
|
||||
result[i] = make([]uint8, dx)
|
||||
}
|
||||
var ii, jj uint8
|
||||
for i := 0; i < dy; i++ {
|
||||
for j := 0; j < dy; j++ {
|
||||
for j := 0; j < dy; j++ {
|
||||
result[j] = make([]uint8, dx)
|
||||
for i := 0; i < dx; i++ {
|
||||
ii = uint8(i)
|
||||
jj = uint8(j)
|
||||
result[i][j] = ii ^ jj
|
||||
result[j][i] = ii ^ jj
|
||||
}
|
||||
}
|
||||
return result
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
func CalculateImage(f func(int, int) [][]uint8) image.Image {
|
||||
const (
|
||||
dx = 256
|
||||
dy = 256
|
||||
dy = 1024
|
||||
)
|
||||
data := f(dx, dy)
|
||||
m := image.NewNRGBA(image.Rect(0, 0, dx, dy))
|
||||
|
Loading…
Reference in New Issue
Block a user