build image with selected palette