<?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"
	>
<channel>
	<title>Comments on: DisplayObject to JPEG or PNG with IImageEncoder</title>
	<atom:link href="http://blog.tsclausing.com/post/21/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.tsclausing.com/post/21</link>
	<description>Personal &#38; Professional Blog of T. Scot Clausing // Adobe Flex Consultant in Nashville, TN</description>
	<pubDate>Sun, 01 Aug 2010 05:24:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: steve</title>
		<link>http://blog.tsclausing.com/post/21#comment-157</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Wed, 02 Jul 2008 14:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/21#comment-157</guid>
		<description>JPEG version worked wheras all other methods which I have been looking for the last 6 hours didnt!!! IE friendly (sort of) as well as firefox....Many Thanks!

</description>
		<content:encoded><![CDATA[<p>JPEG version worked wheras all other methods which I have been looking for the last 6 hours didnt!!! IE friendly (sort of) as well as firefox&#8230;.Many Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: T. Scot Clausing</title>
		<link>http://blog.tsclausing.com/post/21#comment-18</link>
		<dc:creator>T. Scot Clausing</dc:creator>
		<pubDate>Sat, 02 Feb 2008 14:36:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/21#comment-18</guid>
		<description>@Ben - That's the more efficient way of doing this.  I'm actually considering trying out the method that AlivePDF uses for sending a ByteArray in POST data without using AMF.  Check out their code on the PHP side:

&lt;pre&gt;
&#60;?php
$method = $_GET['method'];
$name = $_GET['name'];

if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {

	// get bytearray
	$pdf = $GLOBALS["HTTP_RAW_POST_DATA"];
	
	// add headers for download dialog-box
	header('Content-Type: application/pdf');
	header('Content-Length: '.strlen($pdf));
	header('Content-disposition:'.$method.'; filename="'.$name.'"');
	echo $pdf;
	
}  else echo 'An error occured.';

?&#62;
&lt;/pre&gt;

^ Hows that for simple?  I have read of people having problems with this method when sending image data, but it may be worth a shot as well.  (And check out AlivePDF if you haven't - very young but very cool).  Encoding images as Base64 really just comes in handy when images need to be stored in a database.  I'll update this post when I get a moment.</description>
		<content:encoded><![CDATA[<p>@Ben - That&#8217;s the more efficient way of doing this.  I&#8217;m actually considering trying out the method that AlivePDF uses for sending a ByteArray in POST data without using AMF.  Check out their code on the PHP side:</p>
<pre>
&lt;?php
$method = $_GET['method'];
$name = $_GET['name'];

if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {

	// get bytearray
	$pdf = $GLOBALS["HTTP_RAW_POST_DATA"];

	// add headers for download dialog-box
	header('Content-Type: application/pdf');
	header('Content-Length: '.strlen($pdf));
	header('Content-disposition:'.$method.'; filename="'.$name.'"');
	echo $pdf;

}  else echo 'An error occured.';

?&gt;
</pre>
<p>^ Hows that for simple?  I have read of people having problems with this method when sending image data, but it may be worth a shot as well.  (And check out AlivePDF if you haven&#8217;t - very young but very cool).  Encoding images as Base64 really just comes in handy when images need to be stored in a database.  I&#8217;ll update this post when I get a moment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Throop</title>
		<link>http://blog.tsclausing.com/post/21#comment-16</link>
		<dc:creator>Ben Throop</dc:creator>
		<pubDate>Sat, 02 Feb 2008 05:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tsclausing.com/post/21#comment-16</guid>
		<description>Hey Scot,

Another method for doing this is to encode the jpg as a ByteArray and send it to an AMF interface like AMFPHP. With that in place you can just do a file_put_contents on the server end and you're good to go. However, like you said, if simplicity on the server is what you're after, your method has legs simply because you don't need to install AMFPHP.</description>
		<content:encoded><![CDATA[<p>Hey Scot,</p>
<p>Another method for doing this is to encode the jpg as a ByteArray and send it to an AMF interface like AMFPHP. With that in place you can just do a file_put_contents on the server end and you&#8217;re good to go. However, like you said, if simplicity on the server is what you&#8217;re after, your method has legs simply because you don&#8217;t need to install AMFPHP.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
