<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Export SVG from Raphael JS to create a PNG bitmap</title>
	<atom:link href="http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/</link>
	<description>Front-end Web Lover.</description>
	<lastBuildDate>Sat, 26 Nov 2011 22:02:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: L. Garcia</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-1292</link>
		<dc:creator>L. Garcia</dc:creator>
		<pubDate>Wed, 30 Mar 2011 15:36:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-1292</guid>
		<description>Hello there, 

I am trying the serialization plugin at https://github.com/jspies/raphael.serialize. This is probably a naïve question... I noted you use $.each, is that JQuery or Prototype? How can I get that functionality in pure Javascript?

Thanks</description>
		<content:encoded><![CDATA[<p>Hello there, </p>
<p>I am trying the serialization plugin at <a href="https://github.com/jspies/raphael.serialize" rel="nofollow">https://github.com/jspies/raphael.serialize</a>. This is probably a naïve question&#8230; I noted you use $.each, is that JQuery or Prototype? How can I get that functionality in pure Javascript?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gokool</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-1230</link>
		<dc:creator>Gokool</dc:creator>
		<pubDate>Sat, 19 Mar 2011 16:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-1230</guid>
		<description>I found a way to do it client side. I have tested it only with chrome, and ff so far though http://stackoverflow.com/questions/4086703/convert-raphael-svg-to-image-png-etc-client-side</description>
		<content:encoded><![CDATA[<p>I found a way to do it client side. I have tested it only with chrome, and ff so far though <a href="http://stackoverflow.com/questions/4086703/convert-raphael-svg-to-image-png-etc-client-side" rel="nofollow">http://stackoverflow.com/questions/4086703/convert-raphael-svg-to-image-png-etc-client-side</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Spies</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-7</link>
		<dc:creator>Jonathan Spies</dc:creator>
		<pubDate>Fri, 09 Jul 2010 17:16:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-7</guid>
		<description>I don&#8217;t really need the server side. What I&#8217;m doing is allowing a user to draw, save that drawing, and pull it up again for editing. At the top of that gist I added a loadJSON function that builds a Raphael set out of the saved JSON. 

They remain objects and I return the set so I can throw some event handlers onto them to allow them to be selectable and editable. 
It&#8217;s all client site except for an Ajax call to save/load the json to/from the database.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t really need the server side. What I&#8217;m doing is allowing a user to draw, save that drawing, and pull it up again for editing. At the top of that gist I added a loadJSON function that builds a Raphael set out of the saved JSON. </p>
<p>They remain objects and I return the set so I can throw some event handlers onto them to allow them to be selectable and editable.<br />
It&#8217;s all client site except for an Ajax call to save/load the json to/from the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Barnett</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-6</link>
		<dc:creator>Ben Barnett</dc:creator>
		<pubDate>Fri, 09 Jul 2010 17:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-6</guid>
		<description>Thanks for emailing to let me know that there was an issue with posting comments. Having some troubles with spam so hopefully it&#8217;ll all be sorted now. 

I ran into a few issues re-building the SVG &#8216;path&#8217; attribute as Raphael seems to store it&#8217;s arrays slightly differently (hence the lengthy loop for that case). However having run a few tests on some more involved drawings your JS has really helped. Thanks for that &#8211; also like the way you&#8217;ve cleaned up the return path as well, neatness is good. 

Did you need the server side element to this? Just wondering if you managed to adapt that side of things too.</description>
		<content:encoded><![CDATA[<p>Thanks for emailing to let me know that there was an issue with posting comments. Having some troubles with spam so hopefully it&#8217;ll all be sorted now. </p>
<p>I ran into a few issues re-building the SVG &#8216;path&#8217; attribute as Raphael seems to store it&#8217;s arrays slightly differently (hence the lengthy loop for that case). However having run a few tests on some more involved drawings your JS has really helped. Thanks for that &#8211; also like the way you&#8217;ve cleaned up the return path as well, neatness is good. </p>
<p>Did you need the server side element to this? Just wondering if you managed to adapt that side of things too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Spies</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-5</link>
		<dc:creator>Jonathan Spies</dc:creator>
		<pubDate>Fri, 09 Jul 2010 17:14:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-5</guid>
		<description>Great post. Thanks a lot. 

I needed to serialize the SVG object for a different reason, but your gist really put me in the right direction. I noticed looping through the paper object didn&#8217;t give me all the SVG objects. Did you run into this? I found they were stored in a linked list starting at the top and bottom methods for the paper object.  

I put a modified &lt;a href=&quot;http://gist.github.com/435337&quot; rel=&quot;nofollow&quot;&gt;gist up&lt;/a&gt; that also has support for some more basic shapes (rect, ellipse, and text).</description>
		<content:encoded><![CDATA[<p>Great post. Thanks a lot. </p>
<p>I needed to serialize the SVG object for a different reason, but your gist really put me in the right direction. I noticed looping through the paper object didn&#8217;t give me all the SVG objects. Did you run into this? I found they were stored in a linked list starting at the top and bottom methods for the paper object.  </p>
<p>I put a modified <a href="http://gist.github.com/435337" rel="nofollow">gist up</a> that also has support for some more basic shapes (rect, ellipse, and text).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Barnett</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-4</link>
		<dc:creator>Ben Barnett</dc:creator>
		<pubDate>Fri, 09 Jul 2010 17:13:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-4</guid>
		<description>Rob I think you might be on to something there. I agree, any way to avoid having to repeat all of Raphael&#8217;s hard work in PHP would be a bonus as it&#8217;s obviously faster and also makes the technique future proof with future releases. 
The only server side code we will still need though is the hook into Apache Batik or one of the other SVG rasterizers. One to actually execute it and probably a bit more logic to actually do something with the resulting PNG, even if it&#8217;s just outputting a URL to it. The rest could be handled client side as you say. 
Definitely something I&#8217;ll be looking into.</description>
		<content:encoded><![CDATA[<p>Rob I think you might be on to something there. I agree, any way to avoid having to repeat all of Raphael&#8217;s hard work in PHP would be a bonus as it&#8217;s obviously faster and also makes the technique future proof with future releases.<br />
The only server side code we will still need though is the hook into Apache Batik or one of the other SVG rasterizers. One to actually execute it and probably a bit more logic to actually do something with the resulting PNG, even if it&#8217;s just outputting a URL to it. The rest could be handled client side as you say.<br />
Definitely something I&#8217;ll be looking into.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven Phillips</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-3</link>
		<dc:creator>Steven Phillips</dc:creator>
		<pubDate>Fri, 09 Jul 2010 17:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-3</guid>
		<description>Great post dude, that has helped me out big time</description>
		<content:encoded><![CDATA[<p>Great post dude, that has helped me out big time</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Crowther</title>
		<link>http://www.benbarnett.net/2010/06/04/export-svg-from-raphael-js-to-create-a-png-bitmap/#comment-2</link>
		<dc:creator>Rob Crowther</dc:creator>
		<pubDate>Fri, 09 Jul 2010 17:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.benbarnett.net/?p=9#comment-2</guid>
		<description>This is excellent work, I&#8217;m going to have to think of a project to try it out.  The only thing I&#8217;m thinking is, do you really need to use PHP on the server side to generate the SVG from the object on IE when you already have a load of code in Raphael to do that for you?  If you could force R.svg to be true somehow would it then be possible to &#8216;trick&#8217; Raphael to output the SVG for you directly? 
I&#8217;ve looked at the code and it probably isn&#8217;t a simple thing to do, but it&#8217;s probably going to be simpler than recreating all that Raphael functionality in PHP?</description>
		<content:encoded><![CDATA[<p>This is excellent work, I&#8217;m going to have to think of a project to try it out.  The only thing I&#8217;m thinking is, do you really need to use PHP on the server side to generate the SVG from the object on IE when you already have a load of code in Raphael to do that for you?  If you could force R.svg to be true somehow would it then be possible to &#8216;trick&#8217; Raphael to output the SVG for you directly?<br />
I&#8217;ve looked at the code and it probably isn&#8217;t a simple thing to do, but it&#8217;s probably going to be simpler than recreating all that Raphael functionality in PHP?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

