A common task is to interoperate with code expecting data as raw bytes, eg as a single contiguous array or as an array of padded scanlines.
It would be great to have an example and an entry in the docs.
I'd be happy to make a contribution but the reason I'm asking about it is that I'm not exactly sure how best to do it, short of just copying pixel-by-pixel.