Dan Margulis Applied Color Theory
Is Gammaless Better?
Date: Sun, 23 Jan 2005 00:26:39 +0100
From: "Francisco Bernal"
Subject: ¿It is better to work in programming in
an linear or gamma corrected image?
And I wonder ¿It is better to manipulate an
image in an lineal space or in a
gamma corrected ones? I am talking about programming,
not about use a
retouching software...
¿Any advice?
/*--------------------------------------*/
Francisco Bernal Rosso
Webpage at:
http://www.geocities.com/pacorosso
http://www.fotoforum.net/socios/b/b_f/fotos.htm
http://www.michelle7.com/contributors/r/paco_rosso.htm
___________________________________________________________________________
Date: Sat, 22 Jan 2005 17:52:30 -0800
From: Paul D. DeRocco
Subject: RE: ¿It is better to work in
programming in an linear or gamma corrected image?
It depends upon the specific function. Anything that
involves the additive combination of weighted values, e.g. blurring, should
be done in the gamma 1 domain. Other functions can be done directly in the
image's color space. There are some functions that _must_ be done in a
domain that roughly matches the brightness scale of the eye, although
off-hand I don't remember specifically which.
There's a guy, Timo Autiokari, who swears one should
use linear for everything, and he's a real crank about it, to the point of
making himself infamous in various newsgroups and mailing lists. In
reality, he's right about some things, and wrong about others. You may
learn some things from his web site (http://www.aim-dtp.net), but don't
take everything you read there as gospel.
Ciao,
Paul D. DeRocco
___________________________________________________________________________
Date: Sat, 22 Jan 2005 18:28:21 -0800
From: Mike Russell
Subject: Re: ¿It is better to work in
programming in an linear or gamma corrected image?
From a strictly software standpoint, linear space is
assumed by most - if not all -graphics algorithms, e.g. quarter red plus
quarter red equals half red. Color fringing occurs, to some extent,
any time you apply a linear operation in gamma space. Does this mean
we should all start working in 1.0 gamma space? No.
Here's an interesting 1998 article, by Alvy Ray Smith
that touches on this issue. Click on the small red square to get the
pdf. http://alvyray.com/Memos/MemosMicrosoft.htm#NonlinearAlphaQuestion .
Mike Russell
www.curvemeister.com
www.geigy.2y.net
___________________________________________________________________________
Date: Sat, 22 Jan 2005 22:18:43 -0800
From: Paul D. DeRocco
Subject: RE: ¿It is better to work in
programming in an linear or gamma corrected image?
From: Mike Russell
Does this mean we should all start working in 1.0
gamma space? No.
Fortunately, PS does this automatically for some
operations, if you turn on the "Blend RGB Colors Using Gamma"
checkbox in the color settings, and type in 1 for the value.
Ciao,
Paul D. DeRocco
___________________________________________________________________________
Date: Sun, 23 Jan 2005 15:12:17 +0100
From: "Francisco Bernal"
Subject: Re: ¿It is better to work in
programming in an linear or gamma corrected image?
Thanks Paul.
My thinking (probably wrong) is: if gamma correction is
to bring some perceptual uniformity to th ewhole range of lighting in the
image ¿Why aply the manipulation in linear -non uniformity
perceptual- space? If I apply a weihgted value in the shades, and the same
in the lights, in an linear space the efects are non uniform perceptualy,
but (maybe) in a gamma corrected one. As I say I am only wondering, I try
to un derstand this issues.
/*--------------------------------------*/
Francisco Bernal Rosso
Webpage at:
http://www.geocities.com/pacorosso
http://www.fotoforum.net/socios/b/b_f/fotos.htm
http://www.michelle7.com/contributors/r/paco_rosso.htm
___________________________________________________________________________
Date: Sun, 23 Jan 2005 16:24:19 EST
From: Dan Margulis
Subject: Re: ¿It is better to work in programmi
ng in an linear or gamma corrected image?
For most manipulations that don't involve gradients it
makes little difference whether the space is perceptually uniform or not,
or whether the data is completely linear or very close to linear (like,
gamma 1.1). However, certain things work better at a relatively high gamma
and others at a relatively low one. Sharpening is somewhat better at a high
gamma and blurring and blending better at a low gamma. Curves and similar
maneuver are more controllable in a high gamma environment with respect to
detail, but in a low gamma environment with respect to color. If a
curve is applied and then the user wishes to reduce its effect by 50
percent, this move works better in low gamma.
To see the drawback of high gamma, imagine you must
find the RGB color that is midway between bright green and bright red.
Clearly this needs to be some kind of subdued yellow, as that is the hue
they both share. That subdued yellow is what you get if you blend in
LAB, where gamma is not a factor. If you blend in RGB, however, 255r0g0b
and 0r255g0b average to 128r128g0b. Because of the gamma factor the child
will be much darker than either parent, as well as being too green. This
has considerable implications for painting tools and for blurring.
Dan Margulis
___________________________________________________________________________
Date: Sun, 23 Jan 2005 18:38:35 -0800
From: Paul D. DeRocco
Subject: RE: ¿It is better to work in programmi
ng in an linear or gamma corrected image?
You can experiment with gamma 1 manipulations fairly
easily, using a custom
RGB space in PS.
Ciao,
Paul D. DeRocco
___________________________________________________________________________
Date: Mon, 24 Jan 2005 09:38:38 EST
From: Dan Margulis
Subject: Re: ¿It is better to work in programmi
ng in an linear or gamma corrected image?
Paul DeRocco writes,
You can experiment with gamma 1 manipulations fairly
easily, using a custom
RGB space in PS.
Indeed. I am the originator of that method, first
publishing it in 2000.
Dan Margulis
___________________________________________________________________________
Date: Mon, 24 Jan 2005 09:26:40 -0800
From: Paul D. DeRocco
Subject: RE: ?It is better to work in programmi
ng in an linear or gamma corrected image?
Somewhere along the line, I managed to save the linear
color space as an ICC profile. Now, I can't figure out how I did it. I
don't recall using a separate program to extract it from an image. Do you
know of a way of getting PS to spit out a .icc file, based on a custom
color space?
Ciao,
Paul D. DeRocco
___________________________________________________________________________
Date: Mon, 24 Jan 2005 12:31:39 -0500
From: Lee Clawson
Subject: Re: ¿It is better to work in programmi
ng in an linear or gamma corrected image?
on 1/23/05 4:24 PM, Dan Margulis at Dan Margulis wrote:
Sharpening is somewhat better at a high gamma and
blurring and blending better
at a low gamma. Curves and similar maneuver are more
controllable in a high
gamma environment with respect to detail, but in a low
gamma environment with
respect to color.
Dan,
Is this specific to how Adobe implements them in
Photoshop or more general?
Lee
___________________________________________________________________________
Date: Mon, 24 Jan 2005 18:47:25 +0000
From: Shangara Singh
Subject: Re: ?It is better to work in programming in an
linear or gamma corrected image?
It was 24/1/05 5:26 pm, when Paul D. DeRocco wrote:
Somewhere along the line, I managed to save the linear
color space as an ICC
profile. Now, I can't figure out how I did it. I don't
recall using a
separate program to extract it from an image. Do you
know of a way of
getting PS to spit out a .icc file, based on a custom
color space?
Paul
Possibly:
--Color Settings
--Working Spaces
--RGB popup menu: YourColorSpace
--Custom RGB from popup menu
--Input custom settings Custom RGB
--Custom name
--OK
--RGB popup menu: Customized workspace
--Choosing Save RGB...
Shangara Singh.
________________________________________________
http://www.photoshopace.com || http://www.examaids.com
___________________________________________________________________________
Date: Mon, 24 Jan 2005 11:04:37 -0700
From: Andrew Rodney
Subject: Re: ?It is better to work in programming in an
linear or gamma corrected image?
On 1/24/05 10:26 AM, "Paul D. DeRocco" wrote:
Somewhere along the line, I managed to save the linear
color space as an ICC
profile. Now, I can't figure out how I did it. I don't
recall using a
separate program to extract it from an image. Do you
know of a way of
getting PS to spit out a .icc file, based on a custom
color space?
Go into Custom RGB, futz around with the settings, then
select 3Save RGB.2 You get a simple Matrix ICC profile.
BTW, this term being used in this thread (Gamma) is
technically incorrect. The proper term is Tone Response Curve. Gamma is a
very simple formula that plots a specific value of which very, very few
devices and even color spaces follow. Just to be clear. The correct
statement would be "the TRC of Adobe RGB is Gamma 2.2" NOT
"Adobe RGB has a Gamma of 2.2"
The second statement uses Gamma to mean TRC which
it does not.
"Linear Gamma" is also incorrect
"Linear TRC" or "a TRC of Gamma
1.0" would both be correct.
Andrew Rodney
http://digitaldog.net/
___________________________________________________________________________
Date: Mon, 24 Jan 2005 13:17:32 EST
From: Dan Margulis
Subject: Re: ?It is better to work in programmi
ng in an linear or gamma corrected image?
Paul DeRocco writes,
Somewhere along the line, I managed to save the linear
color space as an ICC
profile. Now, I can't figure out how I did it. I don't
recall using a
separate program to extract it from an image. Do you
know of a way of
getting PS to spit out a .icc file, based on a custom
color space?
Yes. Assume that what you want is an RGB that uses the
same primaries as Wide Gamut RGB, but has a gamma of 1.0.
1. Open Photoshop: Color Settings and be sure that
"Advanced Mode" is checked.
2. In the Color Settings dialog, change Working Spaces:
RGB to Wide Gamut RGB. Do NOT click OK.
3. Change Working Spaces: RGB to Custom RGB. The Wide
Gamut RGB numbers come up by default in the ensuing Custom RGB dialog.
4. In the Custom RGB dialog, change gamma to 1.0. The
Name will now default to "Custom RGB". Change it to something
comprehensible, like "Wide Gamut 1.0 gamma."
5. Click OK to return to the basic Color Settings menu.
"Wide Gamut 1.0 gamma" should now read as your RGB working space.
6. Change Working Spaces: RGB to Save RGB. This
prompts you to save out the new profile. The profile is NOT saved with the
Save button in the Color Settings dialog.
7. Having saved out the profile, click Cancel in the
Color Settings dialog to restore your original settings.
Dan Margulis
___________________________________________________________________________
Date: Mon, 24 Jan 2005 13:14:29 -0800
From: Paul D. DeRocco
Subject: RE: ?It is better to work in programmi
ng in an linear or gamma corrected image?
Oh, I see it now. I was looking for a Save button
somewhere, rather than a Save RGB entry in the drop-down list. Peculiar
interface design.
Ciao,
Paul D. DeRocco
___________________________________________________________________________
Date: Mon, 24 Jan 2005 17:15:44 EST
From: Dan Margulis
Subject: Re: ¿It is better to work in programmi
ng in an linear or gamma corrected image?
Lee Clawson writes,
Is this specific to how Adobe implements them in
Photoshop or more general?
For practical purposes it's general. Technically it's
general for detail and Photoshop-specific for color, but doing the color in
a more reliable way (e.g. converting to LAB internally and doing the mixing
there) would be quite compute intensive. I suspect it would be possible
today but it certainly wasn't a couple of years ago. So I doubt that any
other program does it better. Most don't even offer the limited option
Photoshop has of doing certain blends at 1.0 gamma.
Dan Margulis
Adobe Photoshop training classes are taught in the US by Sterling Ledet & Associates, Inc.