Allow PNGs with less than 256 palette entries

I was debugging a crash using some PNGs from @x-a-n-a-x and I saw that they had 255 colors in the palette, not 256.