It'd be good to mention this is specifically 16 bit indexed.

If I understand it correctly, 'I' can also be used to represent coloured 16 bit indexed PNGs -- are we sure that the method you use below also works for these?