mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
Remove unused code
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user