From: Vincent Vanwaelscappel Date: Fri, 23 Feb 2024 16:36:55 +0000 (+0100) Subject: wip #6750 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f48f99e43b8bd45aa143cb1cfba65810f66d779f;p=fluidbook_tools.git wip #6750 --- diff --git a/src/SVG/SVGTools.php b/src/SVG/SVGTools.php index defb0ab..70c007f 100644 --- a/src/SVG/SVGTools.php +++ b/src/SVG/SVGTools.php @@ -35,7 +35,7 @@ class SVGTools return self::_optimizeSVG($in, $out); } - public static function optimizeSVGStr($in, $fix = false) + public static function optimizeSVGStr($in, $fix = false, $opt = '') { $dir = Files::mkdir(sys_get_temp_dir() . '/svgopt'); @@ -45,7 +45,7 @@ class SVGTools $infile = Files::tempnam($dir, 'svgopt') . '.svg'; file_put_contents($infile, $in); $outfile = Files::tempnam($dir, 'svgopt') . '.svg'; - self::optimizeSVG($infile, $outfile); + self::optimizeSVG($infile, $outfile, $opt); unlink($infile); if ($fix) { $fixed = Files::mkdir(sys_get_temp_dir() . '/svgopt-fixed');