4 $renderer = "inkscape";
8 If you're a hacker, please look away
12 $render_sizes = array("16"=>"sc_","24"=>"lc_");
13 $render_dpis = array("16"=>"60", "24"=>"90");
15 $svgs = `find
. -name
"*.svg"`
;
16 $svgs = explode("\n",$svgs);
18 echo "* rendering PNGs\n\n";
19 foreach ($svgs as $line) {
21 $file = eregi_replace("^./lc_(.*)\.svg","\\1",$line);
22 //echo "\n" . $file . "\n\n";
23 foreach ($render_sizes as $size => $prefix) {
24 $SVG = "lc_$file.svg";
25 $PNG = "$prefix$file.png";
26 //delete older version
27 if (file_exists($PNG)) unlink($PNG);
28 echo "$SVG => $PNG\n";
29 if ($renderer == "inkscape") {
30 $exec = "inkscape -z -e $PNG -f $SVG ";
31 $exec .="-w $size -h $size";
34 exec("rsvg -w $size -h $size $SVG $PNG\n");