Add new comment

It is implemented in

It is implemented in different way:

after unpack() call, decoded raw data are placed in
imgdata.rawdata.raw_image[] - for bayer image
imgdata.rawdata.color3_image[3][] - for 3-color images
imgdata.rawdata.color4_image[4][] - for 4-color images
(only one of these pointers is non-zero after unpack() call).

So, you may access unprocessed raw values directly.

Also, if you port code from dcraw.c (or old LibRaw versions), you may use LibRaw::raw2image() call to copy data from above-mentioned arrays to imgdata.image[4][] array

See samples/unprocessed_raw.cpp as a sample of raw_image[] array access.

-- Alex Tutubalin @LibRaw LLC