rawproc 0.9 Is Released, and rawproc2 is Contemplated...

Thanks, that helped a lot! That gets it much closer to the result I had from 0.6.2. I used input.raw.libraw.rawdata=1 and I think that was the missing piece. Does the display profile affect anything more than the preview? I set it anyway, just in case.

With colorspace, pasting in the primaries and hitting enter only seems to change the message that is triggered when saving (“no CMS profile found, saving with the assigned internal color profile” vs “no internal working profile found, saving without a color profile”). The actual file it saves is identical with or without colorspace added, despite the changed message when colorspace is added with primaries. I can also put 9 random values into the colorspace assign field, and it will also change the dialog to say it is using the assigned space but the file saved remains unchanged. No matter the value of colorspace, it also doesn’t change the preview.

It lacked gamma after all that, so I also added a gamma:2.4 at the end (2.2 was ok too but a bit dark, and 0.6.2 seemed to use 2.4, so for my purpose I preferred 2.4).

Good. I’m learning from your experience, by the way. I’ve been my only customer to date, and I’m rather tolerant of myself… :grin:

First, I think I forgot a key property to make all this color stuff work, cms.profilepath. This property needs to point to the directory where you’ll store all of your ICC profiles - camera, working, or output. Anytime rawproc needs a profile, it looks for it in this directory. When I downloaded @Elle’s excellent profiles, I just set mine to that directory and I added to it my display and camera profiles as I created them. So, set up that directory somewhere and set cms.profilepath to point to it before you do anything else…

Nothing other than the display image pane. File output is indeed separate, and I’ll discuss that below…

Ah, now I need to describe what to do with making file renditions, e.g., JPEGs. Assigning a camera space was only half the requirement for display, and the same thing applies to file output. Need to specify an output profile for export to files, same as we do for display. To do that, set the property output.jpeg.cms.profile=some_sRGB_profile.icc. With that file, rawproc will, if the internal image has an assigned profile, will convert the image from the assigned profile’s colorspace to the colorspace (and tone, will get to that in a bit) of the output.jpeg.cms.profile before saving the image to the JPEG file.

To handle this, my recommendation is to let the output profile do the work. @Elle’s profiles all come with different versions based on the tone curve, or TRC in ICC-speak. For instance, “sRGB-elle-V2-g22.icc” has a gamma 2.2 tone curve, and when used as an output profile will compel the transform change the image to that gamma. The key thing with making rendition files of your images is to insure the file contains a profile that accurately represents the image colorspace and tone. That way:

  • color-managed viewer software knows what to do with it.
  • Using sRGB profile helps non-color-managed viewer software ‘do the least harm’ as it just blats the image to the screen.
  • Oh, and using a V2 (ICC Version 2) profile for JPEGs is a good idea presently, as not all color-managed viewers handle V4 profiles. rawproc, due to the excellent LittleCMS library it uses, handles both.

You might want to queue this in your reading list:

I wrote it last year to generically describe the mechanics of color management in raw image processing. It follows our discussion here pretty well.

I know this is a lot to deal with, but once it’s set up it’s all pretty straightforward to use. More importantly, doing all this by-hand provides a crucial experience with how raw processing works end-to-end, with as few abstractions as possible to cloud your understanding. Even dcraw was doing things for you, with rawproc 0.9, you can become personally responsible for every single step… :grin:

Thanks, this is all great information, and stuff I want to understand better!

One other question, when I used 0.6.2, and had use_camera_matrix on with colorspace set to adobe, it exported a file with a profile named “dcraw D65-adobe, gamma 2.4”. What was rawproc doing to build that profile, and how I can replicate it in 0.9? There was no camera matrix available (I presume, being too new of a camera) so I’m guessing rawproc built a default of some kind? I really liked the look I was getting.

It’s been so long since I’ve used that processing; I had to go run one… :smiley:

So, if you set the following parameters such:
input.raw.libraw.rawdata=0
input.raw.libraw.colorspace=adobe
inpug.raw.libraw.gamma=srgb

The image at input is already RGB, converted to and assigned the adobe colorspace, and the srgb gamma preset gets you 2.4, but that’s already what you were doing in 0.6.2… But, if you save this to JPEG without putting a profile in output.jpeg.cms.profile, rawproc will save the JPEG with that internal profile.

in rawproc I use the dcraw primaries to build the dcraw profiles for assigning to the dcraw images; it’s all internal, and i don’t have files of them. One way to get a ICC file would be to use exiftool to extract it from a processed image that has the profile embedded:

$ exiftool -icc_profile -b -w icc somefile.jpg #courtesy Phil Harvey, from his forum.

Then, put it in the directory pointed to by cms.profilepath and you can use it anyplace in rawproc you can specify a profile.

1 Like

Hi Glenn, making a try with rawproc. I don’t know if that’s a good time…
I’ve followed your doc without (seeing) any issue, including librtprocess and wxWidgets, until the make of rawproc itself where I get this:

…/…/src/rawimage.cpp:407:30: error: ‘struct libraw_data_t’ has no member named ‘rawparams’; did you mean ‘params’?
407 | RawProcessor.imgdata.rawparams.shot_select = 0;
| ^~~~~~~~~
| params
…/…/src/rawimage.cpp:574:38: error: ‘struct libraw_data_t’ has no member named ‘rawparams’; did you mean ‘params’?
574 | RawProcessor.imgdata.rawparams.shot_select = atoi(p[“shot_select”].c_str());
| ^~~~~~~~~
| params

I’m running Debian sid, cmake version 3.22.1, GNU Make 4.3 and g++ (Debian 11.2.0-12) 11.2.0. Any tip to go further ? TIA.

Yep, those changes showed up with the most recent libraw snapshot. I accommodated them in the just-released 1.2 code.

If you prefer to continue with the source tree you have, make the changes specified here:

https://github.com/butcherg/rawproc/commit/514e22fcdb5acce1960e59ae91790403ea5cb924

Ok, my libraw version is 0.20.2-2.
I’ll make a try reverting the above commit.
Thanks!

Went alooking for where they made the change, couldn’t find it. Last good link before that change was with the 202101 snapshot…

I can launch rawproc, get the help.
When I open an image and accept apply colorspace I get this.



image

And maybe some others…
Then it opens the image and I can start to explore the tool ! :smile:

EDIT1 On github it is said :

requires the user to specify a profile directory…

Where I have to do that ?

EDIT2
On the console I’ve a log of this:

(rawproc:42149): Gtk-CRITICAL **: 21:16:16.751: gtk_box_gadget_distribute: assertion ‘size >= 0’ failed in GtkCheckButton

It looks like you’re using wxWidgets 3.1.5. I need to sort out where that’s happening, but for now I recommend using 3.1.4. If you don’t mind clicking through them, there’s no harm.

In the properties, you need a cms.profilepath. rawproc expects to find all of the ICC profiles in that directory, camera, working, and display/export.

Open the help, go to “How to use rawproc”. Right at the top of that page is a Setup section that’ll tell you about all the properties that you need to get started.

Gtk kicks a lot of these, with no consequence. I stopped chasing them a while back when I couldn’t find them in rawproc; appear to be in wxWidgets.

Thanks for the answers. Started to read the help !

1 Like

I find it really handy to help me remember what I coded… :laughing:

Settings. Whatever the icc profile I select for display.cms.displayprofile (including sRGB.icc) I get “CMS:disp_error (-)” in the bottom bar and the image darkens. Is that ok ?

Hmmm… the only thing that comes to mind immediately is that there’s no input profile for the display transform. Somewhere in the tool chain before where you want to display (the checked tool is the displayed image), insert a colorspace tool and assign a profile there, either select the camera profile at the bottom of the params pane or specify a file in the file box.

If you opened a JPEG or other rendition format that contained an embedded profile, that should be used, without having to assign a profile manually…

Edit: if you have a suitable input profile for the display transform, you should see “CMS: display(-)” or “CMS: display(n)” with a number corresponding to the display upon which rawproc sits if you defined mulitiple display profiles.

Put this in input.raw.default:

group:colorspace:camera,assign;subtract:camera;whitebalance:camera;demosaic:proof blackwhitepoint:rgb,data

This will process any opened raw to a linear RGB. You can subsequently break the group apart by right-clicking the group tool and selecting “Convert group to tool list”, and then be able to modify the individual tools. Or, just change the group in input.raw.default to remove the group…

Whatever I do here, the error message stays.
The only way to get rid of it is to remove display.cms.displayprofile in properties. In that case I get back “CMS: display (-)”. The help says that in this case rawproc uses the internal sRGB profile.

That would then indicate that the display profile isn’t valid in some way. I thought I’d trapped all that, but LittleCMS is a large black box…

I know Elle’s sRGB profiles work as display profiles, try this one:

Post your sRGB.icc here, I’d like to try it.

The krita’s sRGB one:
sRGB.icc (6.8 KB)
My monitor:
samsung_D65_100_20211213.icc (2.3 KB)

With or without group in there, I don’t see any group in the toolchain.

image

About the Elle’s profiles, I’ve seen once one of them work, but I don’t succeed in reproducing …