View Single Post
  #241 (permalink)  
Old 12-15-2007, 11:13 AM
colin9876 colin9876 is offline
Basic4ppc Veteran
 
Join Date: Nov 2007
Posts: 316
Awards Showcase
Beta Tester 
Total Awards: 1
Default condense fn

Ive swapped over my orignonal condense function to try out Hashing methods and Im comming to the conclusion that my condense method was faster, and better.

Condense(R,G,B)=int (R /(64)) *16 + int (G /64) *4 + int(B/64)
gives 64 possible indexs in rapid time and no need for a colors table either!

Unless Im missing something theres no available Hash function that maps large RGBs uniquely to small integers that has a 1to1 reverse look up??? so might as well use this condense method with the proviso that PSB doesnt use two v similar colors

Last edited by colin9876 : 12-15-2007 at 11:42 AM.
Reply With Quote