convert 8 bit RGGB to 16 bit debayered


I have a series of 100 frames in 8 bit RAW (RGGB).
How can I convert them in 16 bits, if possible debayered?


So, what’s the file format? Just a dump of 8-bit values into a file? If so, how are the channels arranged? RGGBRGGBRGGB…? Or, RRRRR… GGGGGG… GGGGG… BBBBBBB…?

A program that can read/write such files AND do basic debayering is G’MIC:

The developers hang out here, so you can easily ask questions as you go. Parts of their documetation of interest: