POV-Ray : Newsgroups : povray.beta-test : png gamma error : Re: png gamma error Server Time
31 Jul 2024 00:24:25 EDT (-0400)
  Re: png gamma error  
From: Adrien Beau
Date: 24 Sep 2001 11:12:08
Message: <3BAF4D9C.6123C620@sycomore.fr>
Kari Kivisalo wrote:
> 
> "Jon A. Cruz" wrote:
> >
> > I REALLY like the idea that display gamma has no effect whatsoever on the output
> > file.
> 
> The samples in the file are calculated using assumed_gamma/Display_Gamma
> as the exponent. Assumed gamma is best used as a contrast control for
> compensating scene lighting conditions (indoors/outdoors/night) and should
> not be included in the display gamma information in the image file.

assumed_gamma is (should be) the gamma at which the scene was
designed. Display_Gamma is (should be) the gamma of the system
on which the file is being rendered.

Of course, when rendering on the system on which the file was
created the values are (should be) the same. So the files are
written on the disk as if no gamma correction has happened,
which is the right thing to do since most format can't account
for gamma correction.

But give your PC-source to a Mac user, and the values will be
different (and well needed). So the files are written on the
disk with a gamma correction - but this gamma correction was
achieved through higher-precision internal POV math.

Finally, 1/Display_Gamma is (should be!) written into gamma-
supporting file formats, so that viewers on other platforms
can correct the image on the fly, if they have been configured
correctly. Anyway, the user on the other platform can also
rerender the file, if he has the source.

* Kari, I'm sure you know all this, but I felt the need
* to recap, if only for my own understanding of the issue.

> TweakPNG shows that pov sets the gamma header to 1.0 on all pngs. It
> should be 1/Display_Gamma as Warp pointed out.

I agree.

> As usual Photoshop does it's own thing and ignores the png gamma :)
> I wonder how many applications actually use the png gamma information?

Not many, I'm afraid. Worst of all, they don't say if they do,
and to which extend.

Actually, I find that gamma has become impossibly hard to
manage, since every application layer corrects (corrupts?)
it to some extent, now. Windows does some gamma correction
on its own through color profiles. Then, e.g. Paint Shop Pro
adds another layer of gamma correction, and I have the worst
experience: if you select a color in the palette (drawn
by Windows), your pencil draws with another color, because
it was corrected by PSP on the way. :-(

But that doesn't diminish the need for assumed_gamma and
Display_Gamma, which are independant of all this mess.

-- 
Adrien Beau - adr### [at] freefr - http://adrien.beau.free.fr
 Mes propos n'engagent que moi et en aucun cas mes employeurs


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.