home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vtserf!creatures!actor.realtime.cs.vt.edu!apdent
- From: apdent@actor.realtime.cs.vt.edu (Tripp Lilley)
- Newsgroups: comp.graphics
- Subject: Re: Summary: Image negative to positive algorithm
- Message-ID: <3445@creatures.cs.vt.edu>
- Date: 10 Sep 92 22:36:24 GMT
- Sender: usenet@creatures.cs.vt.edu
- Organization: Actor Project @ Virginia Tech
- Lines: 27
-
-
- > The colour version seems to lose contrast and have an unwanted tinge.
- > We are currently trying to overcome this.
-
- The RGB values are not weighted equally. Silly me, i can't remember
- which has more weight, but it's something on the order of .3*R + .3*B +
- .4*G == 1 (do not assume that those are the correct weights... someone
- out there should know them and post them since i am in the midst of a brain
- fart.) so... in order to create a negative from a positive,
-
- Xn is COLOR_X(new version) Xo is COLOR_X(old version)
-
- Rn = .3*(Rmax - Ro)
- Bn = .3*(Bmax - Bo)
- Gn = .4*(Gmax - Go)
- Here again, Rn + Bn + Gn should add up to 1... now you multiply these
- values by whatever your maxShade is (64 for VGA? 256?)
-
- ii may have gotten the math horribly wrong on this. if so, take what's in the
- first paragraph, and figger it out from there <grin>
-
- -t.
- --
- -------------------------------------------------------------------------------
- | Tripp Lilley -- APDENT@actor.realtime.cs.vt.edu |
- | Nuisance to all, benefit to fewer...but often found being cheerfully paisley|
- | >>> my opinions are. |
-