adding palette functionality to the image converter