Open Photography Forums  
HOME FORUMS NEWS FAQ SEARCH

Go Back   Open Photography Forums > Color Management Discussion > CM Theory and Practice

CM Theory and Practice Profiles, color spaces, perception, science.

Reply
 
Thread Tools Display Modes
  #1  
Old May 21st, 2011, 04:28 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,611
Default Photoshop - "Blend at gamma 1.0"

On several occasions, Bart has mentioned the Photoshop option "Blend at gamma x", in particular when it is set to "Blend at gamma 1.0".

I thought I would discuss this a little.

We will start by assuming that that option (found in Edit>Color Settings) is off. In our mode, we have a file with two layers. In the upper layer we have a uniform field with R=250. (We will only watch the "R" channel here; the same story would work for the other two.) In the lower layer we have a uniform field with R=100.

On the upper layer, we have a pixel mask, set to produce a transparency of 0.4.
(Assuming that the active RGB color space and the nominated grayscale color space have the same "gamma", we could do that by painting the mask with RGB=102,102,102. But it doesn't matter here how we made that mask.)
What will be the R value of the composite image? This table will show how we can reckon that:



We see that for the upper layer, where R=250, the mask transparency, 0.4, by "diluting" the transparency of the pixels, gives them an effective R value of 0.4 x 250, or 100 as a contribution to the composite image.

The presence of these "0.4 potency" pixels in the image stack dilutes the visibility of the pixels on the lower layer; we only see them at "0.6 of par". Their actual R is 100, so they contribute to the R channel of the composite image to the extent of 60 units.

Thus the apparent R channel value of the composite image is 100+60=160 units.

But, because of the nonlinear nature of R, G, and B, the value R=160 does not properly represent the how the the composite image should look. We can see why better when we look at an arrangement that disposes of the problem.

Here, we look at the image buildup when we have turned on Blend at gamma 1.0:



Column Y shows the relative luminance (for the red channel component) represented by the two R values (this is based on the sRGB color space). (The scale of Y is 0-1.0.)

We really want to include 0.40 of the original luminance (red channel) of the upper image (because of the t=0.40 mask), and to see 0.60 of the original luminance of the lower image. These luminance values are shown in column Y'. Their sum would be the (red channel) luminance we would properly see in the composite image.

That luminance (0.458) would be represented by R=180. So the program (in this mode) makes the R value for the composite image 180. And all is well.

Why does Photoshop even include the other option? It points out that many other applications (poor ignorant things) work that way.

Bart suggests that, unless there is some reason to do otherwise, we keep Blend at gamma 1.0 turned on. Sounds good to me.

Best regards,

Doug
Reply With Quote
  #2  
Old May 21st, 2011, 06:11 PM
Bart_van_der_Wolf Bart_van_der_Wolf is offline
pro member
 
Join Date: Jun 2006
Location: Netherlands
Posts: 4,054
Default

Quote:
Originally Posted by Doug Kerr View Post
Why does Photoshop even include the other option? It points out that many other applications (poor ignorant things) work that way.
Photoshop tries to process files rapidly. It is not a scientifc application that necessarily does things the correct way. At least it allows to blend in gamma 1 space, even if it is not the default setting.

Quote:
Bart suggests that, unless there is some reason to do otherwise, we keep Blend at gamma 1.0 turned on. Sounds good to me.
The underlying issue is the gamma 1/2.2 precompensation that's required for displaying images on a Gamma 2.2 display. Image science generally does its calculations in a gamma 1 space, to avoid incorrect/non-linear interpolations.

The gamma issue also rears its ugly head when resampling (is a different kind of blending/interpolating), but AFAIK Photoshop, to date, does not allow to compensate for that. Fortunately there are applications, like ImageMagick, that allow the user to do things right. The following article demonstrates the need to resample in linear gamma space: http://www.4p8.com/eric.brasseur/gamma.html.

Cheers,
Bart
__________________
If you do what you did, you'll get what you got.
Reply With Quote
  #3  
Old May 21st, 2011, 06:39 PM
Andrew Rodney Andrew Rodney is offline
Member
 
Join Date: May 2006
Posts: 467
Default

Quote:
Originally Posted by Doug Kerr View Post
Why does Photoshop even include the other option?
In a nutshell, option is used for reducing edge artifacts that can show up when converting colors. This option originally was found in Photoshop 2.5, but without any control over the setting. Higher values set in Photoshop will result in less smoothing around edges. Like Dither (and other stuff in Photoshop), the setting here is used in all kinds of areas in the app. You can see the effect even with your brushes when you paint. For example, paint with a very saturated green color on a saturated red bkgnd and notice the differences with the check box on or off. The question then becomes, do you have it set to be colorimetrically correct (on) or based upon what you visually prefer?
__________________
Andrew Rodney
Author "Color Management for Photographers"
http://www.digitaldog.net/
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Photoshop - mask transparency math Doug Kerr Image Processing and Workflow 16 May 20th, 2011 03:18 PM
Color Management and Adobe Photoshop Nigel Lew Printing 16 April 15th, 2011 11:59 AM
Photoshop - character '' in Exif metadata Doug Kerr Image Processing and Workflow 6 June 10th, 2010 09:57 AM
IMPORTANT NEWS: Photoshop CS4 to support 64bit on windows only Ivan Garcia Breaking News 1 May 17th, 2008 11:42 AM
CS3 is expected to ship by end of April 2007 Nicolas Claris Breaking News 6 March 28th, 2007 04:22 PM


All times are GMT -7. The time now is 08:39 PM.


Posting images or text grants license to OPF, yet of such remain with its creator. Still, all assembled discussion 2006-2017 Asher Kelman (all rights reserved) Posts with new theme or unusual image might be moved/copied to a new thread!