/[opencvs]/eyes/eyes_rename_color.pl
ViewVC logotype

Contents of /eyes/eyes_rename_color.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Thu Mar 8 15:49:21 2012 UTC (6 years, 9 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
more cleanup for girl3 (Jenni) and cyclone is still in process
1 while (<>) {
2 @row = split(/\|/);
3 ($j,$j,$m,$j,$j,$j,$r,$g,$b) = @row;
4
5 $m =~ s,./i/,,g;
6 $a = 0;
7 for ($i=0;$i <8;$i++) {
8 $a = $a * 2;
9 if ($r >=128) {
10 $a = $a + 1;
11 $r = $r - 128;
12 }
13 $a = $a * 2;
14 if ($g >=128) {
15 $a = $a + 1;
16 $g = $g - 128;
17 }
18 $a = $a * 2;
19 if ($b >=128) {
20 $a = $a + 1;
21 $b = $b - 128;
22 }
23 $r = $r * 2;
24 $g = $g * 2;
25 $b = $b * 2;
26 }
27 $a =sprintf("%6.6x",$a);
28 print "mv " . $m . " " . $a . "_" . "$m\n";
29 }
30

  ViewVC Help
Powered by ViewVC 1.1.5