Match real palette format in ImagePalette.save()