Frame Buffer C Library Sunday, July 15, 2001 This library is out-of-date. Under XFree86, extensions are now available to set the color LUTs in a device independent manner. I'm leaving this library in the public domain because it is interesting that newer graphics cards can be manipulated just like the original PC VGA tables, and because it was the first GPL (only?) code released by PDI. The FB C library, distributed under the GNU Public License, contains utility routines for setting the hardware color lookup tables. These routines can be useful for developing a color calibration system. Two example programs are included: Download a gzip'ed tar file of the FB library and programs. Update: Although these routines and functions still work, I believe there is more formalized support through X extensions that are supported by both the NVidia and ATI cards. The library provides the following two primary routines: int FB_set_luts(short red[256], short grn[256], short blu[256]); int FB_set_gamma(double gamma); The library has been tested under Red Hat using a GeForce2 card, under IRIX on an SGI O2, and on an HP Linux box using an FX/5 card. No other platforms have been tested, nor are any other platforms supported. Please feel free to add support for additional platforms and contact me with patches. Warning! On all platforms, setting the hardware LUTs will change the look of all the windows on your screen. This makes these tools somewhat dangerous since they can make your windowing system unusable if used improperly. For this reason, the programs must be run with superuser permissions on most machines. Programs
The Color CalibrationDeveloping a complete color calibration system requires some programming and a nice photometer. To callibrate your system, you must first determine the display curve for your monitor. This can be done with a light meter that reads gray levels from the screen. For example, you might display a 25% gray, 50% gray and 75% gray images and read the actually displayed values using the light meter. From this information you can build a response curve for your monitor. Then, given a certain target profile, say a linear response or perhaps a respnse curve that mimics a specific film stock, you can build a set of LUTs using the inverse of the monitor reponse curve and your target response curve. Once computed, the LUTs are then set using the FB_set_luts() function in the FB library.
|