POV-Ray : Newsgroups : povray.off-topic : Making a case for (ab)using gamma correction for brightness adjustment : Making a case for (ab)using gamma correction for brightness adjustment Server Time
29 Jul 2024 08:19:57 EDT (-0400)
  Making a case for (ab)using gamma correction for brightness adjustment  
From: Warp
Date: 2 Jan 2012 11:47:48
Message: <4f01dfb3@news.povray.org>
It has been repeated over and over that (ab)using gamma correction to
adjust the brightness of an image is misusing the real purpose for gamma
correction, and that it's not intended for that, and there are reasons why
a technically accurate gamma correction should always be used.

  On the other hand, suppose you *do* want to adjust the brightness of an
image. Putting aside the fact that povray doesn't currently offer any
method for doing this (you'd have to use an external program to adjust
the final image), gamma correction actually is an extremely good way of
doing this, in terms of the end result.

  Think about it: When you change the gamma correction of an image, pure
blacks remain pure blacks, pure whites remain pure whites, and everything
in between is *smoothly* scaled to either brigher or darker, with no jumps
or steppings at either extreme or anywhere (bar for the limitations of
integral pixel component values, which will round floating point values to
nearest integer values).

  It's just the perfect way of adjusting the brightness of an image.
Blacks won't become dark grays (if making the image brighter) nor whites
light grays (if making the image darker), which is seldom what one wants.

  (Perhaps the only drawback is that color gradients that originally appear
linear will start looking non-linear, but that's inevitable if you want to
keep blacks as blacks and whites as whites. OTOH one seldom needs to change
the brightness of the image so much that this becomes a visible problem.)

  So why shouldn't gamma correction be used for this purpose?

-- 
                                                          - Warp


Post a reply to this message

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