Vector Converter
An Open Source project for converting SVG into VML and GIF and back
Installation notes by:
Web browser
Requirements
- PHP (version 4 and 5 supported)
- You need GD2 (for more info see: GD manual on php.net) and xsl extension enabled to display all images correctly
- GD version: between version 1.6 and 2.0.28, GIF support in GD library has been suspended, so make sure you have a greater version
- PHP 4: since PHP 4.3 there is a bundled version of the GD library
- PHP 5: you need a wrapper (included in this version) to display SVG and VML correctly
- Web Browser: Mozilla to correctly view SVG image file and Internet Explorer for VML.
- Web Server (i.e. Apache) installed on your computer
- Operating System: Windows or Linux
Install
- Unzip the ditribution in your webserver's document directory (i.e. C:/Server/Apache/htdocs)
- Ensure that your web server is running
- Open your preferred browser and go to index.html under the project directory
Files structure
- gif2svg.php: include a GIF image in an SVG
- gif2vml.php: include a GIF image in a VML
- svg2gif: transform, thanks to PHP GD2 library, an SVG image in a GIF format
- svg2vml: convert SVG in a VML, through XSLT language
- vml2gif: transform, thanks to PHP GD2 library, a VML image in a GIF format
- vml2svg: convert VML in a SVG, through XSLT language
- xslt-php4-to-php5.php: wrapper that ensure compatibility with PHP4 xslt function calls and allows application to work quite properly
- svg2vml.xsl and vml2svg.xsl: main stylesheets that enables transformations between SVG and VML
- FONT/: truetype fonts
- XSL/: sub-stylesheets for VML to SVG conversion
- XSL2/: sub-stylesheets for SVG to VML conversion
Main files
Main folders
Command Line Interface
Requirements
- PHP: you need to have a PHP interpreter on your operating system with GD2 (for more info see: GD manual on php.net) and xsl extension enabled to display all images correctly
Usage
- open a command shell
- digit: [php_interpreter] vc.php -{vml, svg, gif} fileToConvert.ext fileConverted.ext
- [php_interpreter]: command to run your php interpreter
- vc.php: executable file
- -{vml, svg, gif}: option to select the desired type of conversion
- fileToConvert.ext: file to convert path, where ext is the file extension
- fileConverted.ext: desired converted filename, where ext is the file extension selected in the option
There's no need any installation. It's only necessary to:
where:
File structure
It's the same of the web browser version, with:
- vc.php: script that execute the conversion
- vectorConverter.php: where is defined the Vector Converter object class
Last change: 21 July 2007