diff --git a/image.go b/image.go index 2a44381eb..42a2f9558 100644 --- a/image.go +++ b/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)) } - px := make([]byte, len(p)) - copy(px, p) - i.mipmap.replacePixels(px) + i.mipmap.replacePixels(p) return nil }