The “Image viewer for linear gamma images” topic got me to thinking about the thing in color management I still have trouble with, gamma. So, I took rawproc 0.6.2, @elle’s profiles, and my development test image and set out to 1) see if rawproc made a legitimate linear gamma viewer, and 2) try to wrap my head around what the TRC curves in the profiles really did.
So, two running instances of rawproc, configured thusly:
input.cms=1 - gotta have CMS turned on to do this
cms.profilepath= /home/glenn/ImageStuff/ColorspaceTest/elles_icc_profiles/profiles - where all the profiles reside
display.cms.displayprofile=W2242_1_2017-09-15_16-16_2.2_F-S_XYZLUT+MTX.icc - the thing DisplayCal spit out for my calibrated display, sRGB gamma
Note the display profile has gamma=2.2 TRCs.
I opened the test raw with the following parameters:
input.raw.libraw.colorspace=raw
input.raw.libraw.gamma=linear
input.raw.libraw.cameraprofile=Nikon_D7000_Sunlight.icc
colorspace and gamma do the same thing as dcraw -o 0 -g 1.0. cameraprofile will, when the two previous parameters are raw/linear, find the specified profile and assign it to the image. Nikon_D7000_Sunlight.icc is my calibrated camera profile, made with @elle’s instructions. Oh, its TRCs are linear. Here are the two rawprocs at this point:
Bit of explanation, what you’re looking at: The dock on the left has three panes: 1) Commands, 2) Histogram, and 3) Parameters. In these screenshots, Commands actually has tools in it past the file open, but the checkbox next to the filename displays the result of the input described above. The histogram shows most of the data below 56 on the 0-255 scale (the internal image is floating point, 0.0-1.0), and there are no parameters at this point. Right-clicking the filename in either rawproc allows opening an Information dialog that, among other things, confirms the assigned profile. One more thing to note, the display is produced with the 2.2 TRC, so you’re not really looking at linear gamma. I don’t have this screenshot, but I temporarily replace the display profile with @elle’s linear sRGB profile, and it was dark. Point is, the internal image is linear. Oh and maybe another point would be that I had room to expose to the right…
Next thing to add is a working colorspace:
Now, the Commands pane has the colorspace tool checked for display, both rawprocs. And, the display image hasn’t changed, but the histograms are now different. That’s because I used a linear gamma rec2020 profile to convert the right-hand rawproc internal image, and the gamma 1.8 profile to convert the left hand rawproc internal image. You can see all that in the Parameters panes.
Now, I’ll add a “contrast-stretch” scaling to fill the available tone space. This is the ‘blackwhitepoint’ tool, and the sliders are positioned at roughly the extents of the internal image data (note the histogram shows the result of the operation):
This is where the image becomes usable, but the difference to me is a bit un-intuitive. To my thinking, it’s almost as if the histograms belong to the other rawprocs’ display images. But, the shadow tones are less “crushed” in the linear gamma right-hand-side rawproc, which kinda makes sense. I don’t have a linear gamma calibrated display profile, so I temporarily substituted it with sRGB-elle-V4-g10.icc, and the linear gamma display images confirm this.
I think doing linear gamma editing at this point would, with the linear gamma right-hand-side rawproc, involve inserting the desired tools after the colorspace tool but before the blackwhitepoint tool. I tried a curve tool, but with the data at the bottom of the histogram, I didn’t have much curve to work with.
So @elle, I think rawproc would be a viable linear gamma viewer, but you’d have to work at the configuration. And I think, within the capabilities of its limited toolset, it can do linear gamma editing. I still need to figure out the histograms vice the display images…
One change I’ll probably make to the histogram tool is a choice box to select either 1) the displayed tool’s internal image, 2) the selected tool’s internal image, or 3) the displayed image for the histogram. Another change will be a parameter to enable/disable LCMS optimization for the display transform, per the other thread.
Anyway, food for thought…