Yup. Note that the data range is from zero to about 4095 - it sure doesn't go to 65k as you predicted it would.
No Rich, the 0 to 4095 plot is pure RAW data, non processed in any way obtained through DCRAW's special option -D, as I told you. But once developed the 12 bit range is adapted to the expanded 16 bit range, and there all developing stages take place (you can look at how this is performed in DCRAW's source code, look for the scale_colors() function, which BTW deals with floating point numbers not integers).
That is why I also showed you a 16-bit histogram ranging 0..65535, which is the one you get once the development process is done.
Find here some histogram plots from a DCRAW's developed image, in zoom 1:1 detail (i.e. every pixel column corresponds to one level in the 0..65535 range). The numbers up left and up right show you the displayed 16-bit range. These histgrams are almost completely full
(no gamma has been applied yet, gamma correction generates holes in the low end of the histogram and in fact is the only true reason why holes appear in the 16-bit histogram):
- The peaks correspond to the original captured levels in the 0..4095 range, and you can see they have been scaled from their original range
to take advantage of the expanded 16 bit range. The different scaling for each channel is due to the WB.
- And the remaining levels between peaks (and also in the peaks themselves) are the interpolated values generated in the demosaicing process, as they were already calculated on a 16-bit basis precision.
Last plot is a zoom out version ranging levels 0 to 24575, as you can see far beyond the 4095 limit. Last level with information in this case was 56239 in the blue channel as a result of a light underexposure (I am a really bad street photographer), but normally a few blown pixels reach 65535 in some channel.
You can check by yourself making use of Histogrammar
and Histogrammar tutorial
on any developed file of your own.
BTW my program provides a little statistic about the analysed image, among other information. For the image above:Filled levels
R: 42327 (64,6% of available)
G: 44453 (67,8% of available)
B: 54404 (83% of available)Linear dynamic range
RGB: 56204 (86% of available), range [36..56239]
R: 44292 (68% of available), range [36..44327]
G: 48004 (73% of available), range [119..48122]
B: 56182 (86% of available), range [58..56239]
However this thread is about Curves, so I think we should not discuss this here. My apologies to MarkDS.