greyscale images need to have im.mode RGB