test_image2svg.php

来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· PHP 代码 · 共 27 行

PHP
27
字号
<?php
    // http://localhost/Test_image2svg.php?gif
    
    include_once "XML_image2svg/image2svg.php";

    // Define test images 
    $arr = array(
        "png" => "test.png",
        "gif" => "test.gif",
        "jpg" => "test.jpg",
        "bmp" => "test.bmp"     // Force an unsupported mimetype
    );
    
    // Define a template SVG to be used
    $useTpl = TRUE;

    if(isset($argv[0]) && !array_key_exists((string)$argv[0], $arr ) OR !isset($argv[0])) {
        $file = "test.png";
    } else {
        $file = $arr[$argv[0]];
    }
    
    // Convert an image to SVG
    $i = &new XML_image2svg($file );
    if($useTpl ) $i->tplFile = "tpl.image.svg";
    $i->show();
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?