Color management makes the colors on the screen the colors of the image, whatever the screen is. DSPX shows each image through its ICC profile and the monitor's profile, lets us choose how the two are matched, tags and converts images with two processes, and writes the right profile into the files we save as displayed. This chapter explains what happens, where the choices are and how they affect what we see and what we save.

13.1Color Management in DSPX

An ICC profile says what the numbers of an image mean as colors. The same pixel values look different on two screens unless the program knows the profile of the image (how its numbers are encoded) and the profile of the monitor (how the screen turns numbers into light), and converts from one to the other. DSPX does this for every image it shows, with Little CMS.

13.1.1An image's profile

An image's profile is the ICC profile its file carries: XISF, TIFF, PNG and JPEG keep one (Metadata). An image with no profile is taken to be sRGB, and a gray image without one is gray with the sRGB curve, as XISF, PixInsight and Siril assume. So is an image whose profile cannot be read or is not of its kind, for example an RGB profile on a gray image; the Log says so. When an image opens, the Log names its profile, for example "Color profile of M31: Adobe RGB (1998) compatible.", and the status line shows it, or "no profile (sRGB)" (Statistics and Pixel Values).

13.1.2What the display does

The image is first rendered as it is encoded in its profile, with the screen stretch if there is one (Screen Stretch), and then converted once to the monitor's profile. The conversion happens once for each rendering, before the zoom and the pan, so zooming and panning cost nothing more. A few details matter:

Two image windows of the same photograph, one in Adobe RGB shown managed, one shown as it is
The same colors in two profiles. A color photograph tagged Adobe RGB (1998) compatible, shown color-managed on an sRGB screen (left) and with View > Color-Manage This View off (right). Look at the saturated reds and oranges, which are duller in the unmanaged view. The status line of the right window ends "not color-managed".

13.2Color-Manage This View and Preferences > Color

13.2.1Color-Manage This View

View > Color-Manage This View is a check item. It shows this image in its colors on this screen: from its ICC profile to the monitor's. Off, the pixels go to the screen as they are, for this view alone, and the status line says "not color-managed". It does not change the image.

13.2.2Edit > Preferences > Color

The page has three boxes.

Color-manage the display: On by default. Off, the pixels of every image go to the screen as they are.

Monitor profile: The profile of the monitor:

Rendering intent: How colors the monitor cannot show are brought into its gamut: Relative colorimetric (the default), Perceptual, Saturation or Absolute colorimetric. Matrix profiles such as sRGB and Adobe RGB behave the same with the first two.

Black point compensation: On by default. It maps the image profile's black to the monitor's, so the shadows keep their detail on a monitor that cannot show the profile's black.

The screens: Lists each screen with the profile it is shown in and where that came from. Read Again asks the system again, for example after a change in the system's display settings.

Images: A reminder of the rule: an image is shown in its ICC profile; an image without one is shown as sRGB.

Changes take effect at once, and Reset Page restores the defaults. How the system supplies the profile depends on the platform: Windows asks for the profile of the screen the window is on, macOS for the color space of the display, and Linux on X11 for the profile the display server holds. On Wayland the target is sRGB.

13.3Assign Profile and Convert to Profile

Two processes in Process > Color Management work on the profile of the image. They have PixInsight's ids, parameters and defaults, so the icons of PixInsight's AssignICCProfile and ICCProfileTransformation open here.

13.3.1Assign Profile

Assign Profile tags the image with a profile: the default profile (sRGB), a profile we choose, or none. The pixels do not change; only what they mean does. We use it when an image came without a profile but we know it was made in one, or to correct a wrong tag. It is one history step.

13.3.2Convert to Profile

Convert to Profile converts the pixels from the image's profile (sRGB if it has none) to another, and tags the image with it. It has a target profile or the default sRGB, a rendering intent and black point compensation. It works in double precision; integer images are clipped to their range, and floating-point images keep values outside the range 0 to 1 where the curves allow it (the sRGB curve does; a pure gamma curve takes negative values to 0). A color image takes RGB profiles only, a gray image gray profiles. It is one history step.

13.3.3Naming a profile

A profile is named as PixInsight names it: by the description of a profile installed on the system, by the name of a built-in profile, or by the path of a file. The built-in profiles are sRGB IEC61966-2.1, sRGB (linear), Display P3, Adobe RGB (1998) compatible, Rec. 2020, Rec. 2020 (linear), Gray (sRGB curve) and Gray (linear). "Adobe RGB (1998)" is the installed profile of that name when the system has one, else the compatible one.

  1. Open the image, and choose Process > Color Management > Convert to Profile.
  2. Choose the profile in Profile:, or leave To the default profile (sRGB): on.
  3. Click Apply. The status line now shows the new profile.

Both processes can be previewed live, are saved as processes, and can be read from and written to PixInsight icons. Siril scripts can read an image's profile, in the form it is kept in; assigning or removing a profile from a script is not done in this version.

13.4Saving as Displayed

An image saved as displayed has the pixels the screen shows: the screen stretch applied (Saving Images). In Save Options, the check box Save as displayed (with the screen stretch) chooses it; it is the default for PNG and JPEG, whose 8 bits make linear data useless. Color management decides which profile such a file carries, since the pixels are in the profile the screen took them in:

Saving the data, which means XISF, FITS, TIFF or anything saved not as displayed, 16-bit included, carries the image's profile as it is and adds none. The format notes of the dialog say what each format keeps: TIFF, PNG and JPEG keep the ICC profile.

For a picture to publish on the web, we save PNG or JPEG as displayed with Convert to sRGB on. For the data to keep working on later, we save XISF, which carries the profile untouched, and stretch again when we open it.