home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / graphics / 9609 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  1.5 KB

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