I'm noticing that LibRaw reports a different white level from Adobe's DNG for this camera (and possibly other Fuji cameras too).
Here is one publicly available test image.
I converted this image to a DNG using Adobe's DNG converter. The white level stored in the DNG is 16383.
But libraw.imgdata.color.maximum contains 15872 (0x3e00). It looks like this was set in dcraw_common.cpp in the identify() function.
maximum = (is_raw == 2 && shot_select) ? 0x2f00 : 0x3e00;
I chose a few X-E2s images that have a full tonal range (very dark to very bright pixels) and examined the pixel values in libraw.imgdata.rawdata.raw_image. The maximum value is 16383, so it would seem that DNG is reporting the correct value.
Is this a bug?
Thank you for the problem
Thank you for the problem report.
This code line should work for old Fuji cameras (SuperCCD), but not for current line (X-Trans and current bayer line)
-- Alex Tutubalin @LibRaw LLC
So how should this be fixed?
So how should this be fixed? I presume it'll involved detecting if this is a SuperCCD camera and setting a different white level?