[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
GdFindNearestColor
From: Manuel Teira Paz ####@####.#### Date: 23 Jan 2000 19:51:00 -0000 Message-Id: <Pine.GSO.4.21.0001232032122.3351-100000@hades> Hello again. I have a little question: ¿Why the different weights to the three color components in the cuadratic mean error calculation? Has it something to do with the hardware? Have I missed that school day? Thanks a lot. Regards. -- LLL LLLLL Manuel Teira Paz Telefonica I+D LLL LLLLLLL Tfno: 34 91 337 9973 Infraestructura de Red (5240) LLL L LLL LLL Fax: 34 91 337 4502 C/ Emilio Vargas, 6 LLL LLL LLL LLL ####@####.#### 28043 Madrid (Spain) LLL L LLLLLLL -------------------------------------------------- LLL LLLLL "Sonreir cuando las cosas van mal, quiere decir que ya tienes a quien echarle la culpa" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: GdFindNearestColor
From: "Greg Haerr" ####@####.#### Date: 23 Jan 2000 20:05:25 -0000 Message-Id: <02a401bf65db$bc783160$15320cd0@gregh> : ¿Why the different weights to the three color components in the cuadratic : mean error calculation? Has it something to do with the hardware? Have I : missed that school day? : Manuel, Those are included in attempt to convert based on luminescence, rather than just color space. The formula to convert RGB to grayscale uses those constants to convert to b/w luminescence, as they correspond to the relative brightness of each of the colors. Actually, I have seen other algorithms that are quite a bit faster; I've been considering changing the line in GdFindColor() from sq = (long)R*R*30*30 + (long)G*G*59*59 + (long)B*B*11*11; to sq = abs(R) + abs(G) + abs(B); Perhaps you should try that and see how the color match algorithm works with the std gray palette... Let me know. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |