Tell you what, let’s try to build the toolchain by-hand, and not rely on default processing. That way, you can see at each step what it takes to get to a linear RGB.
- Make sure display.cms=1 and display.cms.displayprofile has a valid profile. If you have a calibrated display profile that’s best, but if not a sRGB profile will suffice. I use Elle’s well-behaved profile set, and her sRGB-elle-V4-g22.icc is what I use when I don’t have a display profile. You can get ready-to-use files here:
-
Make sure rawproc will not apply dcraw processing by setting input.raw.libraw.rawdata=1, or =crop.
-
Open the raw file with File → Open. When the prompt to apply input.raw.default processing comes up, say No. You’ll end up with the out-of-the-file raw image on the screen, dark and monchrome. Also, you’ll see ‘CMS’ in the status line because there’s no input profile available to do the transform. We’ll fix that in the next step…
-
Add a colorspace tool. This is where we’ll assign a camera profile to the image, which will get CMS to do a proper display transform. Since the raw file didn’t contain a color profile, you’ll get a warning about “only ‘assign’ is valid”, and this is important thing to know, any color transform requires both an input and output profile. So, we’ll try “assign camera profile” first, select that with the radio button. The camera make/model should already be displayed; when you click the radio button the tool will go looking for the primaries. If it comes up blank, select the ‘profile file:’ radio button, make sure the ‘assign’ operator is selected, paste those primaries I gave you in the previous post and hit the Enter key. If all is good, you should see a somewhat lighter but still monochrome image and CMS:display in the status bar.
-
Add a subtract tool. If the raw file contained a value, it’ll be displayed in the ‘camera’ operator, and you should select that. If not, then type 512 in the value box and select ‘value’.
-
Add a whitebalance tool. There should be three numbers beside the ‘camera’ operator, those would come from the raw file metadata. If not, this’ll be a bit tricky, as you’ll have to find those numbers yourself. More on that in a bit.
-
Add a demosaic tool. Right now, ‘half’ will suffice. At this point, you should have a decent RGB rendition of the image, but still dark and/or flat. This is a linear RGB, what most folk think of as “raw”, but now we know better…
-
Add a blackwhitepoint tool. The default will be ‘auto/slider’, but select ‘data’ instead, then the ‘min white’ checkbox. You have blown highlights in the sample image; ‘min white’ will push them out past display white and get rid of the highlights’ magenta cast. In other tools, you get this scaling automatically, but you’re using rawproc…
If all that went okay, you should have a reasonable RGB. Now, if white balance didn’t go well, it may be that libraw didn’t read the raw file whitebalance multipliers. I’m not at the right computer to do that, but you can get them out of the file with exiftool. exiftool -G <raw filename>
will do the trick; look for ‘Red Balance’ and ‘Blue Balance’ in the Composite tags. If you can’t find those, you’ll need to do it by-hand; I’ve had decent success using the histogram to do this. Color casts usually show up as offsets of the channels at the high end; using green as the anchor, if the blue channel is ‘lower’, increase the blue multiplier, and vice versa. Do the same for the red channel, and the image color should improve when the histogram channels line up on the right-hand side.
Okay, a bit much, but in doing this you’ll see a few essential thing at play in turning a really-raw image into a presentable depiction. Let me know how it goes…