Remove unused code

This commit is contained in:
Kovid Goyal
2025-10-10 08:19:39 +05:30
parent f852ebc3f3
commit 29e80f2c1b
2 changed files with 1 additions and 14 deletions

View File

@@ -5,7 +5,6 @@ import (
"encoding/binary"
"fmt"
"image"
"image/color"
"io"
"os"
"slices"
@@ -71,18 +70,6 @@ func convert_image(input io.ReadSeeker, output io.Writer, format string) (err er
return Encode(output, img, mt)
}
func PalettedToNRGBA(paletted *image.Paletted) *image.NRGBA {
bounds := paletted.Bounds()
nrgba := image.NewNRGBA(bounds)
for y := bounds.Min.Y; y < bounds.Max.Y; y++ {
for x := bounds.Min.X; x < bounds.Max.X; x++ {
c := color.NRGBAModel.Convert(paletted.At(x, y))
nrgba.Set(x, y, c)
}
}
return nrgba
}
func images_equal(img, rimg *ImageData) (err error) {
for i := range img.Frames {
a, b := img.Frames[i], rimg.Frames[i]

View File

@@ -17,7 +17,7 @@ func reverse_row(bytes_per_pixel int, pix []uint8) {
for i < j {
pi := pix[i : i+bytes_per_pixel : i+bytes_per_pixel]
pj := pix[j : j+bytes_per_pixel : j+bytes_per_pixel]
for x := 0; x < bytes_per_pixel; x++ {
for x := range bytes_per_pixel {
pi[x], pj[x] = pj[x], pi[x]
}
i += bytes_per_pixel