mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
parent
f1091910bd
commit
77a8ece691
4
image.go
4
image.go
@ -454,9 +454,7 @@ func (i *Image) ReplacePixels(p []byte) error {
|
|||||||
panic(fmt.Sprintf("ebiten: len(p) was %d but must be %d", len(p), l))
|
panic(fmt.Sprintf("ebiten: len(p) was %d but must be %d", len(p), l))
|
||||||
}
|
}
|
||||||
|
|
||||||
px := make([]byte, len(p))
|
i.mipmap.replacePixels(p)
|
||||||
copy(px, p)
|
|
||||||
i.mipmap.replacePixels(px)
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user