Correctly convert paletised PIL images