$pid=open2(*IN, *OUT, "$params{prog} -Tpng");
# open2 doesn't respect "use open ':utf8'"
- binmode (IN, ':utf8');
binmode (OUT, ':utf8');
print OUT $src;
}
}
- return "<img src=\"".urlto($dest, $params{page})."\" />\n";
+ if ($params{preview}) {
+ return "<img src=\"".urlto($dest, "")."\" />\n";
+ }
+ else {
+ return "<img src=\"".urlto($dest, $params{destpage})."\" />\n";
+ }
} #}}}
sub graph (@) { #{{{