PHP Classes

issues

Recommend this page to a friend!

      PHP SVG to PNG  >  All threads  >  issues  >  (Un) Subscribe thread alerts  
Subject:issues
Summary:There are some issues in this
Messages:3
Author:Rakesh Shekhawat
Date:2009-09-18 07:15:58
Update:2009-10-20 15:04:13
 

  1. issues   Reply   Report abuse  
Picture of Rakesh  Shekhawat Rakesh Shekhawat - 2009-09-18 07:15:58
I am facing following issues in this. I have installed the Inkscape and run the program. Can anyone help me to solve this?

<br />
<b>Notice</b>: Undefined variable: tmpv_svgf in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>35</b><br />
<br />
<b>Notice</b>: Undefined offset: 0 in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>52</b><br />
<br />
<b>Notice</b>: Undefined offset: 3 in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>54</b><br />
<br />
<b>Notice</b>: Undefined offset: 4 in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>54</b><br />
<br />
<b>Warning</b>: imagecreatefrompng() [<a href='function.imagecreatefrompng'>function.imagecreatefrompng</a>]: 'C:\WINDOWS\Temp\icf92.tmp' is not a valid PNG file in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>65</b><br />
<br />
<b>Warning</b>: imagealphablending(): supplied argument is not a valid Image resource in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>68</b><br />
<br />
<b>Warning</b>: imagesavealpha(): supplied argument is not a valid Image resource in <b>D:\phproot\Test\svg2png\function.imagecreatefromsvg.php</b> on line <b>69</b><br />
<br />
<b>Warning</b>: imagepng(): supplied argument is not a valid Image resource in <b>D:\phproot\Test\svg2png\test.php</b> on line <b>24</b><br />


  2. Re: issues   Reply   Report abuse  
Picture of Christian Merkel Christian Merkel - 2009-10-20 09:30:20 - In reply to message 1 from Rakesh Shekhawat
for me it seems your inkscape isnt installed correctly!
I got the same error:

Warning: imagecreatefrompng() [function.imagecreatefrompng]: 'C:\Dokumente und Einstellungen\administrator.000\Lokale Einstellungen\Temp\icf9.tmp' is not a valid PNG file in E:\xampp\htdocs\SVGTest\function.imagecreatefromsvg.php on line 65
Warning: imagealphablending(): supplied argument is not a valid Image resource in E:\xampp\htdocs\SVGTest\function.imagecreatefromsvg.php on line 68
Warning: imagesavealpha(): supplied argument is not a valid Image resource in E:\xampp\htdocs\SVGTest\function.imagecreatefromsvg.php on line 69
Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\SVGTest\function.imagecreatefromsvg.php:65) in E:\xampp\htdocs\SVGTest\test.php on line 24
Warning: imagepng(): supplied argument is not a valid Image resource in E:\xampp\htdocs\SVGTest\test.php on line 25

I installed inkscape under windows XP 32bit in C:\Programme\Inkscape.
After trying the example i got this error.
Than i changed this codeline in function.imagecreatefromsvg.php:
exec( 'inkscape -z --export-area-canvas --export-png="' . $tmpf_png . '" "' . $tmpf_svg . '"' );
into:
exec( 'C:\Programme\Inkscape\inkscape -z --export-area-canvas --export-png="' . $tmpf_png . '" "' . $tmpf_svg . '"' );

than it works!
Dono if this helps you?

  3. Re: issues   Reply   Report abuse  
Picture of Christian Merkel Christian Merkel - 2009-10-20 15:04:14 - In reply to message 1 from Rakesh Shekhawat
Sry for double-post, but i found one more thing!

U need to register the Path from your Inkscape installation in the main path-var (windows-user). So the shell will search this path too. (for example:

Path=C:\WINNT\system32;C:\WINNT;C:\Programme\Inkscape;

than reboot and it will work!
)