mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
restorable: Remove unneeded NextPowerOf2Int usage
This commit is contained in:
parent
1068156215
commit
676a023a30
@ -19,8 +19,6 @@ import (
|
||||
"image/color"
|
||||
"image/draw"
|
||||
"runtime"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal/math"
|
||||
)
|
||||
|
||||
// CopyImage copies origImg to a new RGBA image.
|
||||
@ -32,7 +30,7 @@ import (
|
||||
func CopyImage(origImg image.Image) *image.RGBA {
|
||||
size := origImg.Bounds().Size()
|
||||
w, h := size.X, size.Y
|
||||
newImg := image.NewRGBA(image.Rect(0, 0, math.NextPowerOf2Int(w), math.NextPowerOf2Int(h)))
|
||||
newImg := image.NewRGBA(image.Rect(0, 0, w, h))
|
||||
switch origImg := origImg.(type) {
|
||||
case *image.Paletted:
|
||||
b := origImg.Bounds()
|
||||
|
Loading…
Reference in New Issue
Block a user