Skip to content

Commit

Permalink
Remove unused utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
PassTheMayo committed Oct 6, 2023
1 parent 8238e18 commit a07144e
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,26 +177,6 @@ func flipHorizontal(src *image.NRGBA) *image.NRGBA {
return output
}

func flipVertically(src *image.NRGBA) *image.NRGBA {
bounds := src.Bounds()
output := image.NewNRGBA(bounds)

for x := bounds.Min.X; x < bounds.Max.X; x++ {
for y := bounds.Min.Y; y < bounds.Max.Y; y++ {
index := y*src.Stride + x*4
inputColor := src.Pix[index : index+4]

index = (bounds.Max.Y-y-1)*output.Stride + x*4
output.Pix[index] = inputColor[0]
output.Pix[index+1] = inputColor[1]
output.Pix[index+2] = inputColor[2]
output.Pix[index+3] = inputColor[3]
}
}

return output
}

func fixTransparency(img *image.NRGBA) *image.NRGBA {
checkColor := img.Pix[0:4]

Expand Down

0 comments on commit a07144e

Please sign in to comment.