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

Contents of /eyes/squarethem_32.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sat Nov 1 17:13:48 2014 UTC (3 years, 11 months ago) by hib
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
setting up for enlighenment subrev 3
1 # read from analysis and then square out
2 # variant of squarethem for subrevision 3 of enlightemnemt
3 #This needs /16 and /32 of enlightenment_size because the eye section is 2 times as big
4 # alsus uses enlightenment_subset so we can differentiate beteween set 2 and set 3
5 # set 1 is kinda lost.
6 # less efficient for space, but what the heck
7 #
8 #$val=300;
9 $val = $ARGV[0];
10 # val should be the destination size.
11 $from = $ARGV[1];
12 # from is 1 by default, but could be hoigher if we are just adding records
13 $subdir = $ARGV[2];
14 # subdir is m or m2 depending on
15 if (!defined($from)) {$from=="";}
16 if ($from eq "") { $from = 1;}
17 # 300 gives a 4800x4800 experience - which allows 600 dpi or 1200 dpi on regular paper - good for demo shots
18 # 375 gives a 6000x6000 experience
19 # 625 for our little strange dot gives us a 10000x10000 experience.
20 # 990 for 44 inches 15840 pixels 360 dpi
21 # 1980 for 44 inches 31680 720 dpi yeah!
22 # 1125 for 50 inches 18000 pixels 360 dpi
23 # we could run the match program, and try to make them match up
24 # but probably better with randomness.
25 # we would analyze twice then - once initially, and once again with the squares
26 $valxval = $val . "x" . $val;
27 $i = $from;
28 while (<STDIN>) {
29 ($fname,$width,$height,$r,$g,$b) = split(/\|/);
30 if ($width > $height) {
31 $nheight = $val;
32 $nwidth = int($val * $width / $height+0.99);
33 $d = "+" . int(($nwidth - $nheight)/2) . "+0";
34 }
35 else {
36 $nwidth = $val;
37 $nheight = int($val * $height / $width+0.99);
38 $d = "+0+" . int(($nheight - $nwidth)/2)
39 }
40
41
42 $name = $i . ".bmp";
43
44 print "convert \$ENLIGHTENMENT_SET/common/pics/$fname -resize $nwidth" . "x" . "$nheight \$ENLIGHTENMENT_SET/\$ENLIGHTENMENT_SIZE/$subdir/f$name;";
45 print "convert \$ENLIGHTENMENT_SET/\$ENLIGHTENMENT_SIZE/$subdir/f$name -crop $val" . "x" . "$val$d \$ENLIGHTENMENT_SET/\$ENLIGHTENMENT_SIZE/$subdir/g$name;";
46 print "rm \$ENLIGHTENMENT_SET/\$ENLIGHTENMENT_SIZE/$subdir/[a-f]$name\n";
47 $i++;
48 }
49
50

  ViewVC Help
Powered by ViewVC 1.1.5