15-09-2021

What is gamma correction?

Some of the images on this server, especially the older images, are not gammacorrected. In other words, they are not corrected for the nonlinearrelationship between pixel value and displayed intensity that is typical for acolor television monitor. This nonlinear relationship is roughly a powerfunction, i.e.

Gamma Control is a tool that allows you to control the colour range on your computer with some simple shortcuts, so you can change it to your liking in just a couple of seconds. This is especially useful when you regularly switch between different tasks on your PC. Black Light and Gamma Control on the Mac App Store. I published my first OS X app 12 years ago. That was for Mac OS X Public Beta in year 2001. At the time, I wasn’t satisfied with the default gamma setting of OS X on my orange clamshell iBook, and thus came the first version of Gamma Control.

Gamma Control Mac Os X 10.10

Gamma Control is a tool that allows you to control the colour range on your computer with some simple shortcuts, so you can change it to your liking in just a couple of seconds. This is especially useful when you regularly switch between different tasks on your PC. For Mac OS X, the Color branch of the Displays control panel will take you through a calibration procedure that lets you do this. A subtlety: system gamma. Silicon Graphics workstation monitors have a gamma of 2.4, but they perform gamma correction as if the monitor had a gamma of 1.7.

displayed_intensity = pixel_value^gamma. Most monitorshave a gamma between 1.7 and 2.7. Gamma correction consists of applying theinverse of this relationship to the image before display, i.e. by computingMacGamma Control Mac Os Xnew_pixel_value = old_pixel_value^(1.0/gamma).

Who is responsible for applying gamma correction?If you are viewing these images on a Mac or Silicon Graphics (SGI) workstation(the latter is now obsolete), the operating system applies gamma correction foryou by loading a colormap into the display hardware that recomputes pixelvalues on their way to the monitor using the second formula given above. Inthis case, our older images will look fine to you. If you are viewing theseimages on a Windows PC, then you must configure your video card, browser, orexternal image viewer application to apply gamma correction (see below forinstructions). If your system cannot be configured to apply gamma correction,then you must download our images and correct them yourself, e.g. by applyingthe second formula in software. If you do none of these things, then our olderimages will look too dark to you.

How do I know if my system is applying gamma correction?Look at the two images above. The left image is not gamma corrected. It looksfine on an SGI, but too dark on a PC. In particular, on a PC the sky inthe upper-right corner looks inky, almost as dark as the trees. The rightimage has been gamma corrected to 1.7. It looks fine on a PC, but washed outon an SGI - so washed out that you can see noise from this early-model digitalcamera in the black jackets. On a Mac, the story is somewhere between thesetwo extremes.

Gamma

How do I configure my system to apply gamma correction?If you have configured your browser to launch an external viewer like 'xv' todisplay your images, you can ask it to apply gamma correction for you. Forexample, if your browser is Netscape Communicator (or more recently, Mozilla'sFirefox), your image viewer is xv, and the gamma of your display monitor is2.0, then you can ask xv to apply gamma correction as it displays an image bychanging the invoking command in Netscape to 'image/*; xv -gamma 2.0 %s'. Tofind out the gamma of your monitor, look at the hardware specifications thatyou threw away on the day you unpacked the monitor. Some operating systems andprograms provide an interactive utility to help you determine your monitor'sgamma, typically by asking you to change the brightness of a gray patch untilit matches an adjacent checkerboard of black and white squares that, if yousquint to blur the checkerboard pattern, simulates a 50% gray. As mentionedearlier, most monitors have a gamma between 1.7 and 2.7. Fortunately, asmonitors are replaced by LCDs, the world is slowly converging on a monitorgamma of 2.5.

I don't use an external viewer. What else can I do?If you use your browser to display images, rather than an external viewerapplication, there is currently, and unfortunately, no way to configurebrowsers to apply gamma correction. In that case, you'll have to change thegamma of your entire system. If you use a PC, the 'Display' control panel may,for some video cards, allow you to reset your video card's gamma to compensatefor your monitor. If you use a PC, Linux, and XFree86, it has a program called'xgamma' that will allow for XServer-wide adjustment. (Thanks to Seth Nickellfor pointing this out.) If you use a Mac running OS 9, the Monitor controlpanel includes a way to set your display system's gamma. For Mac OS X, theColor branch of the Displays control panel will take you through a calibrationprocedure that lets you do this.

A subtlety: system gamma.Silicon Graphics workstation monitors have a gamma of 2.4, but they performgamma correction as if the monitor had a gamma of 1.7. This yields a residualgamma (as seen on the monitor) of 2.4 / 1.7 = 1.4. This is called the systemgamma, and it is intended to compensate for the fact that the images you areviewing typically represent brightly illuminated scenes, but you typicallyviewing them while seated in a dimly illuminated room, which changes thetransfer characteristics of your eye.

Another subtlety: quantization spaces.Macs perform gamma correction, as already noted. However, Macs assume that thevalues you write into the frame buffer are not proportional to the intensity ofthe scene you are rendering, but rather to a non-linear power of that scene.Specifically, they assumepixel_value = scene_intensity^(1/1.8).Under this assumption, the gamma correction they need to apply just before themonitor merely needs to make up the difference between this space and a spacethat is gamma-corrected for the monitor. Assuming the monitor has a gamma of2.5, their pre-monitor correction is thusdisplayed_intensity = pixel_value^(1.8/2.5).Actually, if you run the calibration procedure on a modern Mac, it will let youchoose between 1.8 in the foregoing equation (for the Mac world) and 2.2 (forthe PC world). Why the weird interpretation of frame buffer values? Becausethis non-linear space is closer to the way humans perceive brightness. In thisspace, quantization artifacts like banding are equally likely to beobjectionable at the dark and light ends of the grayscale. In a space whereframe buffer values are proportional to scene intensity, you'll see morebanding of light objects than dark objects.

The real catch: uneven standards.After decades of chaos, there are now accepted standards ('color profiles') forembedding information into image files saying whether or not the image has beengamma-corrected, and for what value of gamma. Unfortunately, these profilescan only be embedded into certain kinds of files - for example JPG and TIF, butnot GIF. Moreover, not all applications embed these profiles when they createimage files, and not all applications know how to read embedded profiles.Without knowing whether a particular image contains a color profile, andwhether a particular application is savvy to it, it's impossible to knowwhether or not you need to reset your display's gamma, and to what value. Evenamong images on a single web site, differing gammas may be present, dependingon what system they were authored on. For example, we in the Stanford ComputerGraphics Laboratory gradually moved from SGIs to PCs during 1995-2005, but weare now moving slowly to Macs. If we're working on the uncorrected display ofa PC, our old SGI images look dark to us. If we're on the corrected display ofa Mac, our old SGI images look fine to us, but our PC images look washed out.Worse, as we create new images, we are now unconsciously tuning them to includegamma correction so that they look acceptable on whatever machine we're on (PCor Mac). Even worse, if you use Macs, then Firefox and Safari performgamma correction differently. Look for example at the two versions ofbuddhist monks in thisPicasa Web Album.

Gamma Control Mac Os X 10.13

Gamma control mac os x 10.7

Gamma Control Mac Os X 10.7

How will it end?Fortunately (or unfortunately), PCs have (temporarily) taken over the world,including the world of high-performance 3D graphics. As they do, it becomesreasonably safe to assume that most people are looking at uncorrected displays.In this new world, images should be adjusted to include gamma correction. Ifyou are a creator of images, and your tools are a digital camera and Photoshop,color profiles are correctly embedded and interpreted. If your tools are a 3Drendering program, then (depending on the program) you might be computingso-called linear-luminance images. These images need to be gamma corrected fordisplay or they will look too dark. If you're on a Mac, and images produced byother people look washed out, crank up the room brightness a bit, therebychanging the adaptation of your eye, and they'll look better.

For more information.For a general introduction to the fascinating subject of gamma correction,refer to a computer graphics textbook such asFoley, van Dam, Feiner, and Hughes,Computer Graphics: Principles and Practice, second edition,Addison-Wesley. For a detailed treatment of gamma correction in broadcasttelevision systems, see Pearson, D.E., Transmission and Display ofPictorial Information, Halsted Press, 1975. For more about gammacorrection on computer displays, with particular attention paid to the Mac, seethis great article by Charles Poynton onGamma correction on the Apple Macintosh.

Gamma Control Mac Os Xp

Copyright © 1994 - 2002 Marc Levoy
Last update:January 13, 2009 12:47:04 PM