Add new comment

1st:

1st:

With LibRaw 0.18 (currently in Beta1, Beta2 to be published soon),
in-camera WB multipliers are extracted into
imgdata.color.WB_Coeffs[256][4];
and
imgdata.colr.WBCT_Coeffs[64][5];

This extraction is made for all RAWs with embedded color presets, not only Canons.

1st array (WB_Coeffs) is indexed with EXIF Colorsource, so to get, for example, D65 preset, you need to inspect WB_Coeffs[21] for non-zero values.
2nd array (WBCT_Coeffs) is filled from 0 to 63:
WBCT_Coeffs[i][0] is color temperature (from camera settings)
and
WBCT_Coeffs[i][1..4] are WB coeffs.

There is no automated procedure to copy these values into processing, so one needs to examine array data (or, simply, fill WB drop-down with these values), than copy needed WB Coeffs into
imgdata.params.user_mul[] to use on dcraw_process() stage.
So, processing sequence is
LibRaw::open_file();
LibRaw::unpack();
... examine WB_Coeffs/WBCT_Coeffs
.. copy needed into user_mul
LibRaw::dcraw_process();

(and, sure, you may call dcraw_process() multiple times without unpack() of same file)

2nd:
WB Coeffs to CCT and back is not very complex (look into Adobe DNG SDK sources for sample code), but results of this procedure depends on color profile and camera calibration data used.
So, calculated CCT/Tint will, most likely, not compatible with other programs (or, even, with in-camera WB setting by CCT).

-- Alex Tutubalin @LibRaw LLC