protected static $_e;
protected static $_u;
- public static function optimizeSVG($in, $out = null)
+ public static function optimizeSVG($in, $out = null, $opt = '')
{
if (!str_ends_with(mb_strtolower($in), '.svg')) {
return $in;
return $res;
}
- public static function _optimizeSVG($in, $out)
+ public static function _optimizeSVG($in, $out, $opt = '')
{
$beforeOpt = str_replace('.svg', '.orig.svg', $in);
}
copy($in, $beforeOpt);
- $svg = shell_exec('timeout -s 1 120 ' . FluidbookTools::tools_path('svgcleaner/svgcleaner', true) . ' --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout ' . $in);
+ $svg = shell_exec('timeout -s 1 120 ' . FluidbookTools::tools_path('svgcleaner/svgcleaner', true) . ' ' . $opt . ' --allow-bigger-file --paths-coordinates-precision 3 --copy-on-error --stdout ' . $in);
if (!$svg) {
$svg = file_get_contents($in);
}