# x% gray in digital

Discussion in 'Digital Photography' started by Roy G, Jan 16, 2007.

1. ### Roy GGuest

"Steven Woody" <> wrote in message
news:...
> what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
> x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).
>
> thanks.
>
> -
> woody
>

Eh ????

Roy G

Roy G, Jan 16, 2007

2. ### Steven WoodyGuest

what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).

thanks.

-
woody

Steven Woody, Jan 16, 2007

3. ### aclGuest

Steven Woody wrote:
> what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
> x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).
>
> thanks.
>
> -
> woody

Hi. If the blackpoint is set to 0, then I suppose it will fall at
255*(x/100)^gamma

acl, Jan 16, 2007
4. ### aclGuest

acl wrote:
> Steven Woody wrote:
> > what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
> > x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).
> >
> > thanks.
> >
> > -
> > woody

>
> Hi. If the blackpoint is set to 0, then I suppose it will fall at
> 255*(x/100)^gamma

I should have added that I assumed x% gray to mean "would fall at
2.55*x or gamma=1 (linear mapping)". I have no clue if this is what it
is supposed to mean photographically (eg maybe it already is defined
using some sort of logarithmic scale etc; I have no clue, as I said).

I suspect that was your question too.

acl, Jan 16, 2007
5. ### Mike RussellGuest

"Steven Woody" <> wrote in message
news:...

> what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
> x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).

There are a number of valid ways to answer your question. Here's a simple
one: taking RGB(255,255,255) as 100 percent, for gamma 2.2, the percentages
map to RGB values like this:

00 RGB(0.0,0.0,0.0)
10 RGB(88.0,88.0,88.0)
20 RGB(123.0,123.0,123.0)
30 RGB(148.0,148.0,148.0)
40 RGB(169.0,169.0,169.0)
50 RGB(187.0,187.0,187.0)
60 RGB(203.0,203.0,203.0)
70 RGB(217.0,217.0,217.0)
80 RGB(231.0,231.0,231.0)
90 RGB(243.0,243.0,243.0)
100 RGB(255.0,255.0,255.0)

These numbers were calculated in Photoshop by converting a gamma 1.0
gradient to sRGB, posterizing to 11 steps, and outputting the numbers as
text from the Curvemeister plugin.
--
Mike Russell
www.curvemeister.com/forum/

Mike Russell, Jan 16, 2007
6. ### aclGuest

acl wrote:
> Steven Woody wrote:
> > what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
> > x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).
> >
> > thanks.
> >
> > -
> > woody

>
> Hi. If the blackpoint is set to 0, then I suppose it will fall at
> 255*(x/100)^gamma

oops, typo: should have been
255*(x/100)^(1/gamma)
as it is meant to compensate for the nonlinearity. Maybe someone can
tell me if this is correct, or if x% gray means something else than
what I think? Thanks.

acl, Jan 16, 2007
7. ### Steven WoodyGuest

Mike Russell wrote:
> "Steven Woody" <> wrote in message
> news:...
>
> > what's the pixel value ( from 0 to 255 ) representing a x% gray ? where
> > x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or 1.8 ).

>
> There are a number of valid ways to answer your question. Here's a simple
> one: taking RGB(255,255,255) as 100 percent, for gamma 2.2, the percentages
> map to RGB values like this:
>
> 00 RGB(0.0,0.0,0.0)
> 10 RGB(88.0,88.0,88.0)
> 20 RGB(123.0,123.0,123.0)
> 30 RGB(148.0,148.0,148.0)
> 40 RGB(169.0,169.0,169.0)
> 50 RGB(187.0,187.0,187.0)
> 60 RGB(203.0,203.0,203.0)
> 70 RGB(217.0,217.0,217.0)
> 80 RGB(231.0,231.0,231.0)
> 90 RGB(243.0,243.0,243.0)
> 100 RGB(255.0,255.0,255.0)
>
> These numbers were calculated in Photoshop by converting a gamma 1.0
> gradient to sRGB, posterizing to 11 steps, and outputting the numbers as
> text from the Curvemeister plugin.
> --
> Mike Russell
> www.curvemeister.com/forum/

the data seem close to the formula acl provided.

Steven Woody, Jan 16, 2007
8. ### David J TaylorGuest

acl wrote:
> acl wrote:
>> Steven Woody wrote:
>>> what's the pixel value ( from 0 to 255 ) representing a x% gray ?
>>> where x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or
>>> 1.8 ).
>>>
>>> thanks.
>>>
>>> -
>>> woody

>>
>> Hi. If the blackpoint is set to 0, then I suppose it will fall at
>> 255*(x/100)^gamma

>
> oops, typo: should have been
> 255*(x/100)^(1/gamma)
> as it is meant to compensate for the nonlinearity. Maybe someone can
> tell me if this is correct, or if x% gray means something else than
> what I think? Thanks.

Looks good to me. 18% grey is about mid-scale.

David

David J Taylor, Jan 16, 2007
9. ### Gisle HannemyrGuest

"Steven Woody" <> writes:
> what's the pixel value ( from 0 to 255 ) representing a x% gray?
> where x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or
> 1.8 ).

For 18 % grey (i.e Zone V), and gamma 2.2, the answer is (126,126,126).

For pixel values for the other zones - and some background, please
see: http://hannemyr.com/photo/zonesystem.html
--
- gisle hannemyr [ gisle{at}hannemyr.no - http://hannemyr.com/photo/ ]
------------------------------------------------------------------------
Sigma SD10, Kodak DCS460, Canon Powershot G5, Olympus 2020Z
------------------------------------------------------------------------

Gisle Hannemyr, Jan 22, 2007
10. ### Steven WoodyGuest

On Jan 22, 4:15 pm, Gisle Hannemyr <> wrote:
> "Steven Woody" <> writes:
> > what's the pixel value ( from 0 to 255 ) representing a x% gray?
> > where x ranged from 0 to 100 and gamma is supposed to be 2.2 ( or
> > 1.8 ).For 18 % grey (i.e Zone V), and gamma 2.2, the answer is (126,126,126).

>
> For pixel values for the other zones - and some background, please
> see:http://hannemyr.com/photo/zonesystem.html

thank you, very one!

Steven Woody, Jan 26, 2007