There are several modes that a PNG opened in Pillow can take on. These can have significant consequences for processing channels, transparencies, etc. They are:

  • P mode - palletized images with one channel. They have an image_info dictionary with a transparency key that defines which pixels are transparent
  • PA mode - same as P but with an alpha channel. Not fully supported by Pillow
  • RGB - 3 channel 8bit, opens as a l * w * 3 matrix representing each pixel
  • RGBA - same as above but 4 channels, last being alpha for transparency