Convert SVG image to PNG with PHP

后端 未结 8 2191
没有蜡笔的小新
没有蜡笔的小新 2020-11-22 14:46

I\'m working on a web project that involves a dynamically generated map of the US coloring different states based on a set of data.

This SVG file gives me a good b

8条回答
  •  被撕碎了的回忆
    2020-11-22 15:36

    $command = 'convert -density 300 ';
                            if(Input::Post('height')!='' && Input::Post('width')!=''){
                                $command.='-resize '.Input::Post('width').'x'.Input::Post('height').' ';
                            }
                            $command.=$svg.' '.$source;
                            exec($command);
                            @unlink($svg);
    

    or using : potrace demo :Tool4dev.com

提交回复
热议问题