mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
png: Update for Go 1.13
This commit is contained in:
parent
f028610006
commit
f6390abad7
@ -708,7 +708,7 @@ func (d *decoder) readImagePass(r io.Reader, pass int, allocateOnly bool) (image
|
||||
}
|
||||
}
|
||||
case cbP8:
|
||||
if len(paletted.Palette) != 255 {
|
||||
if len(paletted.Palette) != 256 {
|
||||
for x := 0; x < width; x++ {
|
||||
if len(paletted.Palette) <= int(cdat[x]) {
|
||||
paletted.Palette = paletted.Palette[:int(cdat[x])+1]
|
||||
|
@ -290,7 +290,6 @@ func filter(cr *[nFilter][]byte, pr []byte, bpp int) int {
|
||||
}
|
||||
}
|
||||
if sum < best {
|
||||
best = sum
|
||||
filter = ftAverage
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user