home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / Test_image2svg.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  713 b   |  27 lines

  1. <?php
  2.     // http://localhost/Test_image2svg.php?gif
  3.     
  4.     include_once "XML_image2svg/image2svg.php";
  5.  
  6.     // Define test images 
  7.     $arr = array(
  8.         "png" => "test.png",
  9.         "gif" => "test.gif",
  10.         "jpg" => "test.jpg",
  11.         "bmp" => "test.bmp"     // Force an unsupported mimetype
  12.     );
  13.     
  14.     // Define a template SVG to be used
  15.     $useTpl = TRUE;
  16.  
  17.     if(isset($argv[0]) && !array_key_exists((string)$argv[0], $arr ) OR !isset($argv[0])) {
  18.         $file = "test.png";
  19.     } else {
  20.         $file = $arr[$argv[0]];
  21.     }
  22.     
  23.     // Convert an image to SVG
  24.     $i = &new XML_image2svg($file );
  25.     if($useTpl ) $i->tplFile = "tpl.image.svg";
  26.     $i->show();
  27. ?>