Hi Niall,
Your descriptions are correct. In PixInsight, separate color spaces are used for image processing and color management tasks:
- Each image defines a RGB working space (RGBWS). The RGBWS is used to perform luminance/chrominance separations. For example, when you enable one of those "To luminance" check boxes (in UnsharpMask for example), the luminance is calculated in the RGBWS of the target image. Or when you apply a S curve with CurvesTransformation, the image is first converted into a special HSVL space, the S component is altered, and the result is back converted to RGB. All of those conversions are performed in the target image's RGBWS.
- Each image has an associated (either embedded or not) ICC profile. An ICC profile defines a color space where the numerical pixel values of a given image are meaningful. An ICC profile can either characterize a physical device (camera, monitor, printer, scanner, etc.) in terms of chromatic response, or define a theoretical color space (Adobe RGB (1998), Apple RGB, Wide Gamut RGB, CIE RGB, etc.). In both cases, an ICC profile specifies how numerical pixel values must be interpreted in order to reproduce them correctly, for example in a physical device such as a printer, or to translate them into a different color space, for example when converting from a wide gamut space such as Adobe RGB to a limited gamut space such as sRGB. These operations is what we collectively know as
color management.
The key point is that in PixInsight, RGBWSs and ICC profiles define
separate, independent color spaces. RGBWSs are used for image processing and ICC profiles for color management, and there is no interrelation between them. By separating both tasks we gain in flexibility and efficiency (the divide and conquer strategy).
In other applications, however, ICC profiles are used to carry out luminance/chrominance separations involved in image processing tasks, and this is, IMO, a serious error. This is especially true for astronomical images, where color management oriented color spaces are far from optimal in terms of information representation, as we have discussed several times on this forum and other places.
Why the various pre-defined RGBWorkingSpaces?
The default RGBWS is sRGB because in this way PixInsight behaves as the vast majority of imaging applications out-of-the-box. Otherwise, lots and lots of people would have said "PixInsight's grayscale transformations are way wrong" and similar things for years
But, if I send it 'to you', as a JPEG created by PixInsight, should I include, or not include, an ICC profile?
The general answer to this question is yes. If you have calibrated your monitor, then you must be coherent with your calibrated environment
throughout the entire imaging workflow. Color management works like a chain. If you break a single link, the entire system ceases to work completely.
The correct procedure would be:
- Select the correct ICC profile as the system monitor profile in your operating system. Mac OS X and Windows have integrated color management support. Linux/X11 does not, but PixInsight provides the lacking color management support on Linux.
- Be sure the correct monitor profile is selected when you open Edit > Color Management Setup. Note that on Windows and Mac OS X you cannot select a monitor profile in PixInsight. This is because PixInsight is not a color calibration system, and hence it doesn't try to supplant the functions of a color calibration system. The system monitor profile is selected automatically upon application startup.
- Normally you don't want to select your monitor profile as the default RGB profile. This is because your monitor profile isn't particularly good as a color space to represent your images (usually, all monitors except high-end ones emulate the sRGB space). The usual choice is to work just in sRGB, as it is the de facto standard for the web. This is the default option. Another option is to work into a wide gamut color space, such as Adobe RGB (1998) or ColorMatch RGB for example. In PixInsight, as we have RGBWSs for image processing, the default ICC profiles have no impact on luminance/chrominance separations, so their importance is marginal. In other applications though, this is an extremely important choice.
- When you save a version of your image for the web, convert it to the sRGB space if necessary, that is if you are using a different default RGB profile, or if your image has a different ICC profile embedded. Use the ICCProfileTransformation process for this task. Of course,
do this with a duplicate of your image, as ICC profile transformations are irreversible. Make sure the sRGB profile is embedded in all your versions for the web. We must restrict ourselves to use sRGB for the web because unfortunately there are browsers out there without color management support (guess which one is a notable example: yes, IE). On the other hand, color management is disabled by default in Firefox, and only a marginal fraction of users are aware of FF's color management capabilities.
- When you save an image for other purposes, make sure that the file embeds the correct ICC profile. In this way if for example you send me your image, PixInsight will know how to render it on my monitor. Note that you
must not embed your monitor profile, but the profile that describes your pixel data: either the default RGB ICC profile in your PixInsight installation, or the profile embedded (if there is one) in your working image.
The key point here is: each image file must embed an ICC profile that describes the actual meaning of the pixel values in the image.
And, why then if someone sends ME a JPEG image that they have worked hard on, which presumably 'looks right' on THEIR monitor, does that image 'look totally different' if I 'ChannelExtract' and then (immediately) ChannelCombine again?
Because (1) he/she probably didn't embed the correct ICC profile (usual case), and because (2) the correct ICC profile, if exists, is lost when you split and recombine individual RGB channels (the recombined image acquires the default RGB ICC profile in your PixInsight installation).
Sorry Juan - this is the 'penalty' of being our 'Jedi'
May the Force be with you 8)