Location: PHPKode > scripts > svg2png > svg2png/class.svg2png.php
<?php


/**
 * Class for load SVG file as GD resource
 *
 * Usage:
 * $oicfsvg = new icfSVG( $filename );
 * header( 'Content-type: image/jpeg');
 * imagejpeg($oicfsvg->get_gdres() );
 *
 * @auhthor http://hide@address.com hide@address.com
 * @version 2009Apr18
 * @param string local path or URL of SVG file
 */
class icfSVG{

	var $fn = '';

function icfSVG( $fn='' ) {
		$this->fn = $fn;
	}

/**
 * Set SVG file
 *
 * @param string local path or URL of SVG file
 */
function set_svgfile( $fn='' ) {
	$this->fn = $fn;
	}


/**
 * imagecreatefromsvg - Create new image from file or URL
 *
 * @return resource GD image resource or FALSE
 */
function image( ) {

	require_once( 'function.imagecreatefromsvg.php' );
	return imagecreatefromsvg( $this->fn );

	}


	}/*class*/


?>
Return current item: svg2png