I just began working with PyPNG. But in the metadata is one item I don't understand: planes. So two examples of two files:
File 1
'bitdepth': 8, 'interlace': 0, 'planes': 1, 'greyscale': False, 'alpha': False, 'size': (818, 1000)
File 2
'bitdepth': 8, 'interlace': 0, 'planes': 4, 'greyscale': False, 'alpha': True, 'size': (818, 1000)
I skipped the palette information to shorten the snippets and obviously both files only differ in number of planes and the alpha channel.
So far I figured out that in file 2 my pixel array contains exactly four items per pixel defining red, green, blue and alpha. So for each array has a length of 3272 items.
But in file 1 each array has only a length of 818 items.
Therefore can anybody explain if there is a relation between number of planes and array length and how to extract the colors for a given pixel out of file 1?