Assigning an ICC profile to an image
"Assigning a profile" is a fundamental concept in color management because it is the beginning of the story of our photos...
Why is it necessary to assign an ICC profile or color space to an image ?
Essential ! This paragraph is one of the most important paragraphs of this site. A cornerstone !
Assigning an ICC profile or color space to an image allows it to display it correctly, quite simply ! The RGB values of the file will be "translated" by the "good" colors so the good colors L*a*b*. Let's look back at the history of an image file since the beginning of its history...
All cameras, even smartphones, can't take anything other than a RAW file. This one is therefore developed internally by a kind of mini-Photoshop in order to provide you with a nice JPEG file. The management of the colors of this photo and therefore the succession of the two fundamental stages of the history of a photo, i.e. "the assignment of a profile" and then "the conversion to a color space", is therefore done in a transparent manner for the user and automatically. Without color management no colors, even in a smartphone !
My RAW file is therefore a digital negative. On pro or some amateur cameras, you can retrieve this RAW file to develop it yourself in demo software such as Camera Raw or Lightroom. We will see below how it works then. But let's start with a smartphone or an amateur camera because they directly deliver a Jpeg file without any other possibilities. However, they will necessarily and above all take a photo in RAW format which will be developed internally by the internal mini-Photoshop in order to deliver your image in the form of the famous JPEG file.
Assigning an ICC profile or color space to an image allows it to display it correctly, quite simply !
So how does it work ?
In two steps, invariably... and according to this analogy with the story of a bank note ! You find a 100 something bill on the floor. It is a currency unknown to you. So you obviously can't use it in your favorite stores ! Two things will therefore have to be done : find out which country it comes from to give it a "universal" value and then convert it into dollars. This sequence "give it a value" then "convert" it is called in color management "assignment" then "conversion".
So first of all, we must give it meaning, find its country of origin to give it its universal value. OK, it's 100 things, so it's completely unusable in the United States ! In color management we would call this "The assignment of a profile". They must therefore be converted into dollars according to the exchange rate of the day, i.e. according to a universal value - let us assume gold. In color this standard is called the L*a*b* color space. This is called "conversion". The value 100 of the departure ticket is always 100 when it is identified as 100 something. When you give it meaning. In a photo, the assignment of an ICC profile does not change the RGB values of the file. Simply, RGB values are displayed "correctly" and no longer in a factual reading. Then we convert it into another currency, for example into dollars and they become 10 dollars - so with the same absolute value - my 100 have become 10. The L*a*b* colors are identical but the RGB values of the files are modified.
1 - JPEG photo case : assigning the camera's ICC profile to the image directly in the image
The "mini-Photoshop" of the camera must read the RGB values contained in the photo and translate them into the "right color" and therefore into its "ideal" L*a*b* colors. An RGB signal 255, 0, 0, 0 should be displayed with a red but with which red L*a*b*? This is done by reading the instructions in his ICC profile.
Let's say you took a picture of a perfectly grey wall. Your Jpeg photo should be perfectly grey at this point and therefore your file should have RGB values of style 128, 128, 128. However, your camera has some defects and the RGB values recorded are more like 128, 138, 126. If you display these last values in Photoshop, you will see a greenish-yellowish grey instead. That's why you're disappointed ! But as the manufacturer of your device knows that it has these defects, it has calibrated it so it has noted its defects in its ICC profile i.e. in a table (a matrix table) where it has noted : I show you a neutral grey 128, 128, 128 and you record 128, 138, 126 in the RAW file so with a dominant ugly color! Thus the table tells him if you find an value RGB 128, 138, 126 you display a color L*a*b* 54, 0, 0 therefore a value RGB 128, 128, 128 and not a strange grey.
The RGB value of the file is correct and always 128, 138, 126 BUT the device acts as if it was 128, 128, 128 at the time of its display. Assigning an ICC profile therefore serves only one purpose: to ensure that RGB values are correctly interpreted and therefore displayed without seeking to match RGB values with their "logical" display. An RGB value of 128, 138, 126 has no reason to display with a medium neutral grey without an ICC profile. An ICC profile does not transform a file. The RGB values of the RAW file remain the same but are then interpreted correctly. It's just an instruction manual, a post-it attached to the RAW file to tell it how to correctly display/view its RGB values.
Then, it will be necessary to match the RGB values of the file and the display of the file. Indeed, the eye sees a beautiful neutral grey but if we place the Photoshop eyedropper tool on this grey, it shows us 128, 138, 126 !!!! It doesn't make sense ! This alignment is called conversion and we will see this in detail on the next page .
2 - Case of a RAW file processed by yourself
As I explain below on this page and on my pages dedicated to the color management in Camera Raw or Lightroom,
The ICC profile is also assigned automatically when you open your RAW file in the demo software. To display your photo "correctly", it has read the Exif data from the file, seen with which camera it was taken and has therefore assigned the ICC profile of this camera that belongs to its database - all cameras on the market pass through Adobe's hands and are calibrated by them to establish the ICC profile of each - to display the "right" colors so those that the box is supposed to have photographed and not those that are "logically" written in its RGB values (a 128, 138, 126 is displayed "as if" he had read 128, 128, 128 so with a beautiful grey without a dominant while the RGB value has a dominant).
3 - In the case of an image that comes from the Internet but does not have an ICC profile...
When you open it in Photoshop - this software manages colors so detects that there is no ICC profile attached to this photo or it needs it to correctly display this photo - Photoshop will suggest you to assign a profile to this image through a dedicated menu. It will therefore be sufficient to specify that the ICC profile of this image is probably the sRGB. We will review this in detail on the pages dedicated to the color management in Photoshop.
4 - Last precision - The "true" color: RGB values and L*a*b* color ?
In order to properly represent why the same RGB value corresponds to a different real color - therefore L*a*b* - I projected four different color spaces or ICC profiles on the L*a*b* space. Opposite, we can see the upper right part (towards the red values) of this projection. The angle of each color space or ICC profile corresponds to the most saturated red value since having as RGB coordinates: 255, 0, 0. However, we can see that this same color definition is not projected at the same place in the L*a*b* space, so it corresponds to different "real" red colors.
Note - If, on your screen, you have the feeling that these four red dots display the same shade of red, it is only due to the gamut of your screen which no longer allows you to distinguish distinct reds for such saturated colors).
The same RGB value (255, 0, 0) and yet four real colours, so L*a*b* different in this example. To know which one, we just need to have the ICC profile or the color space associated with an image file for example and to assign it. The RGB value is then interpreted correctly and displayed with the red "good" L*a*b*.
5 - And by the way, what happens if you don't assign an ICC profile to an image ?
Without an ICC profile assigned to the image, it will be displayed arbitrarily according to two possible rules - because it cannot be otherwise - :
1 - In software that does not manage colors - It will simply appear in the color space of the screen quite simply differently on a screen displaying roughly the sRGB or Adobe RGB as we see more and more often since the RGB values of the file are interpreted directly by the screen.
Example: If the image comes from an APN that was set in JPG and Adobe RGB but the ICC profile has been lost and the image opens in Windows or Mac OS Explorer (which do not support color), the image will be displayed by default according to the color space of the screen (so still today most often in sRGB).
2 - In Photoshop if you don't enable your color management - which is the default case even if it may seem strange ! - There, the image will be assigned as an ICC profile the RGB working space of Photoshop (sRGB by default).
How to assign an ICC profile to an image in Photoshop ?
We can say that there are two main cases :
Opening a "classic" image file in Jpeg, Tiff, PSD, etc...
When you open a Jpeg, Tiff or Psd image without an ICC profile (i. e. without color space) in Photoshop (unlike a RAW file as we will see later), this one, if you have chosen to enable color management in this software (see Photoshop color settings for more information and sample images), warns you and asks you to choose one. This is done either when the image is opened directly or, once the image is opened in Photoshop by the Edit menu / Assign profile...
Let's take an example with an image from my old scanner that I open in Photoshop correctly configured on my calibrated screen:
So I open this image - an IT 8 test chart - from my scanner (figure. a below). To understand this, I chose to open it without an ICC profile (figure a below left) - I did not assign the ICC profile of my scanner to the image opening - but as Photoshop necessarily needs to assign an ICC profile to an image to display it, it will force an assignment and in this case it will assign what is called its RGB working space. Here the image opens in Adobe RGB since I had chosen this color space as my RGB working space at the time. The image is displayed with arbitrary default colors, as if it were an Adobe RGB image. Each pixel contains RGB values that are interpreted in this working space. In the image on the left below, you can see that the grey of the test pattern is reddish. Indeed, in the Adobe RGB color space, the RGB value 98, 91, 87 are red. For my image to regain its "true" colors on the display, I must assign it the "right" profile, his! On the picture below on the right, I have assigned the profile of my scanner to my image and my grays regain all their neutrality! It's magical. And you will find that the RGB values are always the same. The RGB values of the info palette do not change BUT the displayed colors, the L*a*b* colors change! Assigning an ICC profile only changes the display of a picture for given RGB values.