Created by: wecacuee
More general to_nd_array that handles when plane.line_size != plane.width * channels, data_type.itemsize
Issue #95 (closed)
Test
>>> import av, urllib, PIL
>>> urllib.urlretrieve('http://fate.ffmpeg.org/fate-suite/png1/55c99e750a5fd6_50314226.png', '/tmp/000.png')
>>> frames = (p.decode_one() for p in av.open("/tmp/%03d.png").demux(video=(0,)))
>>> ndarrays = (f.to_nd_array() for f in frames if f is not None)
>>> np.all(np.array(PIL.Image.open("/tmp/000.png")) == next(ndarrays))
True