Demosaicing of plain RGGB data

can I use LibRaw for demosaicing plain RGGB data (i mean file with no metadata, just pixels stored as [R G R G R G; G B G B G B; ...]?

If I understand it correctly I need to call dcraw_process() and dcraw_make_mem_image() but I do not know how to prepare the buffer and tell the LibRaw size etc.



It works!

Hi - to anyone else who wants to use open_bayer() before anything later than 0.18.2 is stable-released, this is a link to the Github page at the earliest (least risky) version which supports open_bayer().
This works perfectly for 16bit (EDIT: and now 8bit) RAW images without any header or metadata.

(wish I could delete comments but I can only edit them so I must look really silly with two comments in a row)