Color Management in PixInsight



::Index

What Is Color Management?

Further Information

How Does Color Management Work in PixInsight

The Color Management Setup Dialog

Monitor Profile

Default Profiles

Profile Mismatch Policies

Color Management Module

Embed ICC Profiles in Images

Enable Color Management

ICC Profile Assignment and Conversion

The AssignICCProfile Process

The Assign ICC Profile Window

The Image > Color Management Main Menu item



What Is Color Management?

Numerical values used to represent colors in digital images are not absolute quantities: they depend on the particular chromatic responses and gamuts of the devices used to generate pixel data. In general, for the same real subject or source color data, any two imaging devices will yield different colors. This is equally true for both input and output devices, ranging from scanners to digital cameras, from monitor displays to printed media.

Suppose you are using a film scanner as your input device. Then you have to work with your images on a CRT monitor display. Finally, you'll be uploading your images to the World Wide Web, and perhaps you'll want to see them printed too. Each of these devices —film, scanner, monitor, printer— interprets and reproduces colors differently. Furthermore, after image acquisition and initial calibration, perhaps you want to use a device-independent RGB color space to process your images into a wider gamut. Any nontrivial image processing application must be able to give color values their correct meaning at every stage throughout the entire imaging workflow.

Color management makes it possible to interpret color correctly by characterizing each device's chromatic response and by providing the necessary transformations between device-specific color spaces and gamuts, in order to represent color consistently on different output devices.

Chromatic responses and gamuts for specific devices and theoretical color spaces are defined by special information units known as color profiles. The International Color Consortium's (ICC) standard profile format is universally employed by color management software systems.


Further Information

A detailed discussion on color management theory, ICC profiles and color management software systems is beyond the scope of this documentation. However, excellent documents and resources on this and related topics exist on the World Wide Web. To be highlighted among the best sources on color theory on the Internet is Bruce Lindbloom's website, which we strongly recommend to the user.

An excellent description of color management applied to astrophotographical imaging can be found in the book Photoshop for Astrophotographers by Jerry Lodriguss.

To figure out how does color management work under Microsoft® Windows, go to MSDN's section on color management and ICM 2.0.

Finally, to learn more on the ICC profile format and color standards, visit the International Color Consortium website.


How Does Color Management Work in PixInsight

PixInsight implements a color management system based on ICC (international Color Consortium) profiles and the ICM (Image Color Management) version 2 subsystem built in the Microsoft® Windows operating system since Windows 98.

For consistent representation of color on your monitor, PixInsight applies a color transformation each time a pixel is drawn on the screen. This color transformation requires accurate characterization of input and output devices through ICC profiles.

On startup, PixInsight looks for the ICC profile currently assigned to your monitor in your Windows installation. By default, monitors are assigned the sRGB color profile in Windows. PixInsight by itself will not let you change the monitor profile. To assign a particular ICC profile to your monitor, you should perform a monitor calibration by using a third party calibration hardware system and/or specialized software, or by simply installing the ICC profile that came on a CD with your monitor —though this last option is often as inaccurate as just doing nothing.

Input data must be characterized by specific ICC profiles. For a given image, the input profile can be embedded in the source image file, or it can be assigned a default profile if the image is untagged or if you don't want to use the embedded profile for some (hopefully well founded) reason. Input profiles can correspond to physical devices and also to device-independent color spaces such as Beta RGB, Adobe RGB or CIE RGB, which are commonly used to work into wide color gamuts. Anyway, PixInsight will always be using a simple color transformation, which can be schematized as follows:

Image pixel data correspond to actual pixel values in the image. Screen pixel data are pixel values once transformed from the input ICC profile space to the output monitor color space. A rendering intent is a transformation strategy to try the color rendition that best matches a color reproduction environment such as photographical imaging, printer proofing or artwork graphics.

With the above management system, colors that you see on the screen will match as accurately as possible the true colors that an image's pixel values are intended to represent.

No more transformations are used for printing or proofing color management in PixInsight LE 1.0. Anyway, printing capabilities have not been included in PixInsight LE.

From the user perspective, PixInsight's implementation of color management has been divided into two parts: color management setup, where you specify source and destination profiles, rendering intents and default profile mismatch policies, and a dedicated process, namely AssignICCProfile, that allows you to assign specific ICC profiles to images, optionally converting numerical color values.


The Color Management Setup Dialog

The Color Management Setup dialog box is where you define operative parameters of PixInsight's color management system. By selecting appropriate ICC profiles and other options, you tell PixInsight how to manage color to meet your needs. This dialog box can only be accessed through the Edit > Color Management Setup main menu option:


Monitor Profile

This panel shows the file path and description for the ICC profile currently assigned to the monitor in your system. You cannot change the monitor profile in PixInsight because PixInsight is neither a monitor calibration application nor an operative system, and letting you specify a profile for a device without calibrating it would be too naive.

The Rendering Intent list box lets you specify a transformation strategy for screen color rendition. For normal astrophotographical work you'll want to keep the default perceptual rendering intent, which should be the best option for photographical images.


Default Profiles

Here you can select the ICC profiles that will be used for images that have no particular ICC profile assigned. Such images are known as untagged images. Untagged images can be image files that have no embedded ICC profile or files that have embedded ICC profiles you don't want to use.

For an ICC profile to be accessible to PixInsight, it must be correctly installed in your system. In other words, PixInsight will ignore any ICC profile that is not located on the Windows standard profile folder. To install a profile, follow the instructions given by the profile creator and/or your Microsoft® Windows documentation —right clicking it and choosing Install usually does the job.

There are two default profiles, namely one for RGB color images and another one for grayscale images.

ATTENTION: PixInsight can use RGB ICC profiles for both RGB and grayscale images. This is correct in terms of color transformations, but it is a nonstandard practice that most image processing applications don't support. When a RGB profile is assigned to a grayscale image in PixInsight, color transformations for that image work by considering it as a RGB color image whose individual RGB chanels are mutually identical. Be aware that PixInsight will let you embed RGB ICC profiles in grayscale image files, but then you may have trouble when opening such files with other applications.


Profile Mismatch Policies

When you open an image and it does not have an embedded ICC profile, or if the embedded profile is not the default one, what should we do? You can tell PixInsight exactly what to do.

On Profile Mismatch refers to images that embed profiles different from the default profiles you have selected on the Color Managemen Setup dialog. When you open such an image, what PixInsight does depend on the option you have selected:

  • Ask — PixInsight will ask you what to do through a secific dialog box, where available options include the rest of choices you have listed here.
  • Keep embedded profiles — The embedded profile will be used for color management transformations. This is the default and most advisable option.
  • Convert to the default profile — Numerical pixel values are converted from the embedded source profile to the default profile, then the embedded profile is discarded. Select this option if you are absolutely sure of what you are doing.
  • Discard mismatching profiles — Ignore the embedded profile and manage pixel values as if they were defined in the default profile space. Sounds simple, and dangerous...
  • Disable color management — This option will cause PixInsight to throw pixel values directly to the screen for this image. Not recommended.

On Missing Profile is for untaged images, that is, images that don't have an embedded ICC profile:

  • Ask — Same as before. A dialog box will ask you what to do before opening the image.
  • Assign the default profile — This causes a copy of the default profile to be assigned to the image. The image will behave as if the default profile would have been embedded in the original file. If you save the image, the default ICC profile will be effectively embedded.
  • Leave the image untagged — Pixel vales will be assumed to be in the default profile space, but no more assumptions will be made. This is the default option.
  • Disable color management — As before, we cannot recommend you to do that.


Color Management Module

Windows' ICM 2.0 is a modular system. Third party color management modules (CMM) can be installed in your system to replace the default color management engine provided by the operative system. If you have a CMM installed, it should appear here and you can select it. If not, better don't mess with this.


Embed ICC Profiles in Images

When this option is selected, ICC profiles are embedded by default when saving image files to disk. However, when you use Save As to save an image, a dialog box with format-specific options is shown, where you always have an option to disable profile embedding prior to saving.

If you are working in the sRGB space for WWW production, you probably don't want to embed the standard sRGB ICC profile to waste 4 KB in every file you save. In fact, embedding the sRGB profile for images that are to be distributed on the WWW is strongly discouraged, since sRGB is the de facto standard space for the web.


Enable Color Management

When this option is not selected, color management is globally disabled in PixInsight. ICC profiles assigned to images are simply ignored, and pixel values are directly sent to the screen.

Of course, this option is selected by default, and we must ask you to leave it this way unless you have a really good reason to do otherwise.


ICC Profile Assignment and Conversion


The AssignICCProfile Process

The AssignICCProfile process has been included in PixInsight 1.0 to perform profile assignment and conversion operations. You can instantiate this process as a process icon by right-clicking on the main window's background and selecting the appropriate item under New Process:

AssignICCProfile cannot be executed on previews, neither can it be executed globally.


The Assign ICC Profile Window

This window is the standard user interface for AssignICCProfile:

Current Profile shows the description of the ICC profile assigned to the image selected on the view selection combo box (Image01 in the example above), or the default RGB ICC profile (as selected in the Color Management Setup dialog) if no particular view is selected. You cannot change the profile description.

Forget current profile... will cause the process to leave the target image untagged, that is, with no ICC profile assigned. Then the default profile (either RGB or grayscale, depending on the color model of the image) will be used to manage its color. This option will not change actual pixel values.

New Profile lets you assign an ICC profile to the target image. If you have a RGB image selected in the view selection combo box, only RGB ICC profiles will be shown. If the selected view is grayscale or no view is selected, both RGB and grayscale ICC profiles will be selectable.

Transform pixel values to... will use the selected rendering intent and new ICC profile to perform a transformation of pixel values in the target image. The transformation's input profile will be the target image's currently assigned profile, or the default profile if the image is untagged. The transformation's output profile and rendering intent will be as specified.

ATTENTION: When applying a color profile transform, pixel values are transformed to 16-bit unsigned integers first, then the transformation is applied, and finally pixel values are transformed back to PixInsight's native IEEE 32-bit floating point normalized format. Hence, after a profile transform the maximum number of different pixel values will be limited to the 16-bit range of 65536 discrete values. Profile color transforms should be applied before significant processing in PixInsight.


The Image > Color Management Main Menu item

For your convenience, we have included a few items in the main menu that will allow you to perform common color management operations more easily:

The Assign ICC Profile menu item will simply launch the Assign ICC Profile processing window, selecting the active image window in its view selection list.

Transform to Default ICC Profile will transform the active image's pixel values to the default ICC profile, RGB or grayscale, depending on the image color model. See what we have commented above on color profile transformations for the Assign ICC Profile processing window.

Enable/Disable Color Management is used to toggle color management on/off for the active image window. Pressing the F11 key does the same thing. This option lets you evaluate how managed colors differ from raw unmanaged colors. This is very useful to check how your image would look like on an unmanaged environment, such as most web browsers and old-fashioned image processing applications.



::Index