X3F and libraw_get_pre_mul

Hello,

As always, thank you very much for the work on this library, it is incredibly useful, and I'm very happy it exists.

I've been struggling with making X3F files work - I am aware they are incredibly tricky to work with - but some things completely escape me.

I've been trying to fix some of the 'auto white balancing' that's done on X3F, or at least use the no auto white balance option to bring them to 'balance' manually.

What's very interesting that libraw_get_pre_mul returns peculiar values, where the first member of the array is always 1.0, second is around 0.4, and the third one is around 0.3.

Now this couldn't be any sort of gains, I don't think? Applying those multipliers, of course, sends the balance into outer space.

Here's an example of the returned values

[ 1, 0.44240155816078186, 0.28195929527282715 ]

And these values are obviously calculated, I haven't found anything similar in the metadata.

An example of an X3F file (though all X3F files I've tried returned similar numbers)

https://drive.google.com/file/d/19hgJlFtdWRqs3_ep4kJQSzr2aATB3zEC/view?u...

Thank you in advance

Forums: 

Default white balance is

Default white balance is 'daylight', in this case pre_mul is calculated based on camera color data (so fixed for all cameras with same color profile)

Use camera-recorded 'as shot' or automated 'auto' balance for a result that is closer to the reality of a specific photo

-- Alex Tutubalin @LibRaw LLC