PhotoLine fails the color blending test

Here everybody can post his problems with PhotoLine
Benutzeravatar
Hoogo
Beta Tester
Beiträge: 4169
Registriert: So 03 Jul 2005 13:35
Wohnort: Deutschland

Re: PhotoLine fails the color blending test

Beitrag von Hoogo »

Things are getting interesting now ;)

What we want: Some kind of "physical" unit of measurement, where 255=100% means maximum number of photons, 128=50% means 50% of photons, 64=25% means 25% photons. This means gamma=1, linear color space, calculations are easy and correct in this unit.

What we have: Eyes that need ~4 times the light to see something twice as bright, that means a gamma of ~2. 255=100% is still white, but 128=50% means ~25% of photons that LOOK like half a s bright. It is a really good idea to store pictures with such a gamma. Monitors were adapted to this and also use such a gamma, 2.2 is common today, once for good technical reasons, today maybe more because of tradition and compatibility, don't know...

If you want to blend black with 50% white and expect a gray that LOOKS like average brightness, then you will like gamma ~2. But that also gives you the dark blends with colors.
If you prefer a gray of 50% photons that looks much too bright, then you will prefer gamma=1. But on the other hand this looks good with colors.
To me it looks most useful to keep simple formulas and just store the data with the desired gamma value.

Conversion between gammas are usual. Cameras have gamma=1 for most of their range, so gamma is usually converted to ~2 when a Raw is turned into a Jpg. If you would just send a picture with gamma=1 to a monitor that assumes gamma~2, the result will look much too dark. If you work with gamma=1, then the conversion will be done when the final result is sent to the screen. That's where color management starts... Profiles can handle different gamma values better than a formula in a program.

-Check if you have color management enabled, "edit > options..."
-Check in the attributes if your picture comes with a correct profile. If it comes without a profile, assume that it is sRGB and assign sRGB using "tool > colors > set color profile". Or just double click on the profile part in the attributes.
-Enable 32Bit for the document or all the layers. You do not want to have a linear color space in 8 Bit.
-Convert the whole document to a color space with gamma=1 with "tool > color > convert with profile...". All opaque parts of the picture will still be the same, but the blending will give different results.

I hope I did not simplify this receipt too much. PL can have profiles for each layer, and when you are in document mode, the layers are converted to the right space on the fly, but imho that's already a different topic.

You will have different results if you use proPhoto or sRGB. That's not because of different calculations, it's more because of the rendering intend when the result is sent to the screen.
--------------------------------------------------
It's somewhat mindbending to see results assuming different gammas. What is the gamma of the data, what gamma did you or a profile use to correct it?
Your test picture comes without a profile, so I assume it's sRGB. That means the data is stored with gamma 2.2. The topmost area is 50%, so this is the average of data with gamma 2.2.
Now if I convert the picture to a linear sRGB using the receipt above, the bottom area shows values of 50%. So this is the average with a gamma of 1.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Re: PhotoLine fails the color blending test

Beitrag von maho »

Hoogo, thanks for your extensive reply. I think you've summarized it quite well.

To the extent that gamma=2.2 is a de facto standard for many monitors and operating systems, I think it would be very helpful if there were a Working Option or Color Management Option that allowed the user to do all their blending using that gamma value or the value of their choice. I've played around with the existing Color Profile/Management options and I can't figure out a way to do this. To be specific, an option that lets you blend pixels according to

blend = (alpha*color1^gamma + (1-alpha)*color2^gamma)^(1/gamma)

but didn't change the rendering of the image inside PhotoLine- just let your own monitor and OS display the actual pixel values. I created one more image to illustrate the blending issue:

Bild
maho
Mitglied
Beiträge: 123
Registriert: So 18 Mai 2003 02:02

Re: PhotoLine fails the color blending test

Beitrag von maho »

Hoogo, thanks for your extensive reply. I think you've summarized it quite well.

To the extent that gamma=2.2 is a de facto standard for many monitors and operating systems, I think it would be very helpful if there were a Working Option or Color Management Option that allowed the user to do all their blending using that gamma value or the value of their choice. I've played around with the existing Color Profile/Management options and I can't figure out a way to do this. To be specific, an option that lets you blend pixels according to

blend = (alpha*color1^gamma + (1-alpha)*color2^gamma)^(1/gamma)

but didn't change the rendering of the image inside PhotoLine- just let your own monitor and OS display the actual pixel values. I created one more image to illustrate the blending issue:

Bild

The left is many small lines of pure red and pure green. The right is the result of blending the colors using a gamma value of 1.00, 1.25, 1.50, 1.75, 2.00, 2.25. The idea is to hold it at a distance so your eyes can do the blending on the left naturally, and see which box on the right matches on your display. PhotoLine in its default settings is using the top one (gamma = 1.00).

I did find the results varied visually from computer to computer - but none as dark as 1.00.
Benutzeravatar
Hoogo
Beta Tester
Beiträge: 4169
Registriert: So 03 Jul 2005 13:35
Wohnort: Deutschland

Re: PhotoLine fails the color blending test

Beitrag von Hoogo »

Well, there is a way, but it's more complicated than the way you're looking for...
But it is quite logical, as it clearly tells in what color space/gamma your data is stored and in what color space/gamma the blending is done.

-Create a new Document (not picture!) Or load a picture and enable document mode using the attributes panel.
-You need the attributes panel anyways: Select the document tab and enable 32Bit there. Keep 8Bit to see funny banding.
-Now double-click on he entry for ICC profile. I'd choose sRGB with linear gamma.

Now add your layers or place your pictures in this document, for example, load a photo. You will get different results, depending on the profile of the loaded photo.

If your photo came without a profile, then the layer has no profile, too. All its bytes go without a change to the calculation, that means it is treated as if it was in the linear color space of the document, and it should look too bright. Use "tool > color > set color profile" to set the profile FOR THAT LAYER that matches the data. Usually sRGB (not linear) will be fine.
At least now the layer has a profile. PL will convert it on the fly to the space of the document, because you can't add apples and oranges. That's what you want.

To me this is the most logical way:
-You can keep your data unchanged, as you can mix any color space without conversion of the bytes.
-Your calculation work with the correct values, no matter how strange the gamma curves might be. Saying that sRGB has 2.2 is a bit simplified.
-You are clearly told in what color space your data is.
-You can change the space of the document without converting the content.

On the other hand you have to add a profile manually if you want your data in a different space/gamma than the background. But interetingly, this happens far less often than you might expect.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!