Thanks very much. I'll see what I can learn from the source code.
Incidentally, if I bin 2x2, then in GIMP scale the resulting image horizontally by the ratio of pixel dimensions (9.8/6.3) = 1.555, the resulting image seems ok, although at pretty low resolution! Round objects come out round, sensor response looks linear - see attached.

Read More...