Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mailrus!umich!umeecs!zip!spencer From: spencer@eecs.umich.edu (Spencer W. Thomas) Newsgroups: comp.graphics Subject: Re: GIF images lack gamma info too: (was pixel aspect ratio in GIF images) Message-ID: Date: 24 Jul 90 04:10:56 GMT References: <9866@pt.cs.cmu.edu> <9894@pt.cs.cmu.edu> <5031@labtam.oz> <1990Jul23.154140.20291@pdn.paradyne.com> Sender: news@zip.eecs.umich.edu Organization: University of Michigan EECS Dept Lines: 16 In-reply-to: efwjr@bam-bam.paradyne.com's message of 23 Jul 90 15:41:40 GMT Briefly -- to adjust the gamma of an image, you want to do this (without loss of generality, assume pix is in range 0-255): new_pix = (int)(0.5 + 255 * pow( (pix / 255.0), 1/disp_gam ); The assumptions in the above equation are: * The original image is uncompensated (i.e., has a gamma of 1). * disp_gam is the gamma of your display (typically 2 - 3, the NTSC standard is 2.2, according to Roy Hall's book). For more information, see (among other sources, I am sure) Roy Hall, _Illumination and Color in Computer Generated Imagery_, Springer-Verlag, 1989, pp120-125. -- =Spencer W. Thomas EECS Dept, U of Michigan, Ann Arbor, MI 48109 spencer@eecs.umich.edu 313-936-2616 (8-6 E[SD]T M-F)