Color management question

No gamma correction = brighter image than the image with gamma correction applied …
The same brightness you will take if you use a gamma=1 icc profile as input profile (or embedde it in your file) except that the colors will be more faithfull … this last is the correct rendering for your linear data …

The image is linear but it has assigned a wrong gamma-encoded profile (trc>1) ?
or the icc profile assigned has trc=1 (linear)?

If I display a linear image on the monitor without gamma-correction / encoding, the image appears dark. If I display such an image with gamma-encoding applied, the image appears bright, which is the correct appearance, since the CRT reduces the image brightness which is compensated by the gamma-correction. This is the initial purpose of gamma-correction (Poynton, 2010, page 319). However, as Ponyton writes:

If gamma correction had not already been necessary for physical reasons at the CRT, we would have had to invent it for perceptual reasons.

Still I do not understand why in RT the image becomes brigher if I turn off the ICC-profile.

Hermann-Josef

I made a test by deleting the ICC-profile in the image. Same result, if I switch from “use embedded profile” to “no profile”, which I find very strange since this behaviour obviously has nothing to do with the ICC-profile.

I don’t think this is true.

In a icc color managed system the linear image with the correct profile and the gamma-encoded image with the correct profile look identical, they are both bright.

I guess you have tagged incorrectly your scanned image.

Probably in RT
Use embedded profile: use the embedded profile, without a profile RT assume it is srgb (gamma-encoded)

No profile: RT assume the image is linear , so in this case you see the correct brightness, and it use the same color primaries as the working profile (?)

Linear image:

grafik

Image “gamma encoded” according to v = 65535*pow(v/65535,0.4545):

grafik

Hermann-Josef

1 Like

the first image with the srgb-linear profile assigned
linear-assigned-linear-profile

the second image with the srgb gamma 2.2 profile assigned
gamma-encoded-assigned-gamma-profile

I downloaded each image from the thread, neither has an embedded profile. I then opened each in rawproc, and assigned various profiles to see what the display transform would do. My display is roughly sRGB in color and tone, so that’s what it expects from the image to render ‘normal’.

The linear image without an embedded proflie rendered dark, because there was no assigned profile to use in the display transform, pixels straight to the hardware. When I assigned a linear sRGB profile, the image was transformed to display and rendered ‘normal’. When I assigned a gamma 2.2 sRGB profile. the image was transformed to display and rendered dark.

The gamma 2.2 image without an embedded profile rendered ‘normal’, with no display transform. When I assigned a linear sRGB profile, the image was transformed to display and rendered ‘bright’. When I assigned a gamma 2.2 sRGB profile, the image was transformed to display and rendered ‘normal’

The above behavior makes sense to me because what’s important is for the image to have a profile assigned that represents its colorspace and linearity. The transform depends on this as input information to make the right transform using the output (display) profile. If one takes a linear image and assigns a sRGB gamma 2.2 profile to it, the display transform believes it is a gamma 2.2 image and transforms it accordingly, linear-dark.

Don’t know if this helps, was a bit of fun while I watched my mom frost brownies… :stuck_out_tongue:

2 Likes

Thanks for all the replies, but unfortunately they do not address my issue!

I am familiar with ICC-profiles and how to use and embed them. This is not the issue and my question does not address ICC-profiles.

I just want to understand why RT displays a linear image as bright, if I switch to “no profile”. This is all I want to understand. Obviously somehow a gamma encoding seems to take place, but why ?? This happens with and without ICC-profile embedded, so I conclude it has nothing to do with profiles but what RT thinks should be done internally.

Hermann-Josef

The code that handles the input profile for non-RAW images is here: https://github.com/Beep6581/RawTherapee/blob/5bf4da1a84c33c85c5a26041315d58568ed8ff6a/rtengine/stdimagesource.cc#L222

If you selected the “Use embedded” profile and there is no actual embedded profile, embedded is a nullptr and an sRGB profile is assumed. If you selected “No profile” everything here is skipped. The input data can only be assumed to have linear profile.
If you your data is encoded linearly and you assume a linear profile, this should give you a picture that looks okay. If your data is encoded linearly and you assume an sRGB profile, it ‘undoes’ the implied TRC making large input values appear much darker.

1 Like

@Jossie You can test this btw.

  1. Use RT’s internal ICC profile creator to make ProPhoto profile with a linear TRC. Export this to iccprofiles\output folder of RT.
  2. Restart RT to update the Output Profile list.
  3. Take any picture you like, set the Working Profile to ProPhoto and Output Profile to your linear profile. Export as 16 bit TIFF.
  4. Load the exported TIFF. Switching between “No profile” and “Use embedded profile, if possible” should not change anything visually.
  5. Load a custom profile and pick RTv4_sRGB.icc from the iccprofiles\output folder. Voila, a dark picture.
1 Like

@Jossie

  • I generated an output image with a standard sRGB output profile

view in ART with embedded profile

view in ART with no profile

-I generated the same image with a linear profile with sRGB primaries
view in ART with embedded profile


view in ART with no profile

  • R1 : when using embedded profile the displays are quasi identical. very small differences are due to the coding (linear/log)

  • R2: when using a no profile on a TRC coded image it is much brighter, thats normal

  • R3: when using a no profile on a linear coded image, there is mainly a difference in saturation but not in luminance. the difference is pehaps due to primaries definition.

-R4 : I should say that unless knowing exactly what you are doing, no profile is a no option

It’s the same result with RT.

I should say it is difficult to speak about colour management with exemples without embedded profiles. It seems a contradiction for me.

photo credit: @2N3055

The examples were not the original files, they were just screenshots to illustrate what I meant!

I do not have a problem understanding colour management, I have a problem understanding what RT does. Normally I do use ICC profiles and have a working setup for colour management. However, in a first step I encountered the much brigher image when switching from the use of a profile to no profile. Then to simplify things I removed the embedded profile and observed that nothing changed in the behaviour of RT.

Thus all the above answers dealing with the use of this or that profile unfortunately ignore my question – at least I do not see how they answer it.

Okay, but then why does the image turn brighter? It is a linear image (with or without a profile does not change the principle since the profile I had did not include the gamma encoding / correction) and thus should appear dark, if the pixel values are not changed.

Hermann-Josef

@Thanatomanic IMHO got to your angst a few posts ago. This is clearly to me about what RT does or doesn’t do in the absence of the needed input for the display transform. So, color management behavior does have to be teased out of it…

Just for completeness:

I tried the same thing (i.e. switching from use of embedded ICC-profile to “no profile”) in various software I have access to. None of these changes the brightness as does RT. So this seems to be unique to RT.

Hermann-Josef

As @Thanatomanic said above no profile in RT is a pass through. Nothing is applied.
In other programs, if no profile doesn’t change brightness it s surely that the program assumes a sRGB profile. It should be explained in documentation. It is assumed in web app that when no profile is embedded, the image is coded with sRGB profile.

If you remove the embedded profile in a photo, your photo stays coded the same way.
If it was originally coded with a sRGB profile, it will be viewed brighter in RT with no profile (see my post above).

If your image was coded with a linear profile and you strip the profile, it stays coded in a linear profile.
Then if you use embedded profile in RT, a sRGB profile is assumed. The image will look dark.

With no profile, brightnes will be normal, but colors are out

If you read my post, it is not about of the use or this or that profile. you are obliged to use one to be able to code the colors.
the comparison is between linear/TRC, “no profile”/embedded, stripped/not/stripped. conclusion will be the same with other profile primaries.

Precision: when reading image data, color managed SW have to invert the image profile.
@ggbutcher made a SW color management schema but I cannot find it.

1 Like

Why is brightness “normal” then??? The coded pixel values stay the same – no gamma encoding, i.e. dark appearance! This is exactly my point.

Hermann-Josef

I neglect the problem of color coding.
As the coding TRC is linear (no TRC), the inverse fuction is linear (identical function) as the one applied by “no profile”. Thus the brightnes is ok (not completely true due to color coding)
If a SRGB TRC is assumed( gamma encoding), it means that you assume that all dark values were pushed to brighter values. The inverse function that the sw has to apply to recover data will thus pull back values to shadows. If the coding was linear, the image will look dark.

linear doesn’t mean dark appearance. It means a way to code dark values not pushing them to bright values.

if you assume that that dark values were pushed (gamma encoded) to bright values you have to bring back them and you get darker image.

1 Like

But I don’t think it goes into enough detail about the color/tone transform to help here…

@heckflosse
If this is also true for “no profile” and if this sRGB-profile had included the gamma-encoding/correction, this would explain what I see and answer my question. However, this would contradict what is stated in Rawpedia:

Non-raw files will be displayed without any embedded input profile applied, including no gamma correction, which means they will look bright.

Hermann-Josef

The information on Rawpedia is a little inaccurate. “No gamma correction is applied” is absolutely true. However, whether your image will look bright or dark depends on how the data is actually encoded. If you have linearly encoded data, it will become darker. If you have non-linear encoded data (i.e. with an applied gamma), it will become lighter.

Edit: see @gaaned92’s comment below. This depends also on the working space gamut.