<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blackcj.com &#187; BitmapData</title>
	<atom:link href="http://www.blackcj.com/blog/tag/bitmapdata/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blackcj.com/blog</link>
	<description>Cutting edge development with Adobe Flex, ActionScript and AIR</description>
	<lastBuildDate>Tue, 10 Aug 2010 02:29:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Don&#8217;t Forget to Update Your Adobe Products</title>
		<link>http://www.blackcj.com/blog/2009/12/27/dont-forget-to-update-your-adobe-products/</link>
		<comments>http://www.blackcj.com/blog/2009/12/27/dont-forget-to-update-your-adobe-products/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 20:02:07 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe Updater]]></category>
		<category><![CDATA[BitmapData]]></category>
		<category><![CDATA[CS4]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=640</guid>
		<description><![CDATA[Is Flash CS4 crashing when you try to open an FLA? Are you pulling out your hair wondering why Flex 3 doesn&#8217;t auto complete BitmapData? Adobe Updater may be the answer. Flash CS4 10.0.2 One of my co-workers called me over to troubleshoot when a folder full of FLAs were crashing Flash CS4 every time [...]]]></description>
			<content:encoded><![CDATA[<p>Is Flash CS4 crashing when you try to open an FLA? Are you pulling out your hair wondering why Flex 3 doesn&#8217;t auto complete BitmapData? Adobe Updater may be the answer.</p>
<h3>Flash CS4 10.0.2</h3>
<p>One of my co-workers called me over to troubleshoot when a folder full of FLAs were crashing Flash CS4 every time he tried to open them. He had already tried a fresh install of the software and had all of the necessary fonts. So why did it crash? Well it turns out that Flash CS4 had a bug where it would crash when embedded fonts are used.</p>
<p>&#8220;FLA crash on open when fonts loaded.&#8221; -<a href="http://blogs.adobe.com/rgalvan/2009/05/flash_cs4_update_now_available.html" target="_blank">Glavan on Flash</a> <em>(detailed list of what was fixed)</em></p>
<p>After running Adobe Updater everything worked great!</p>
<h3>Flex Builder 3.0.2</h3>
<p>How about Flex Builder? I recently installed Windows 7 with a fresh copy of Flex Builder 3 Professional. Unfortunately I pulled the install from one of my external hard drives and it was version 3.0.1 rather than 3.0.2. A major bug with version 3.0.1 using SDK 3.3 and higher is that BitmapData does not auto complete. After trying multiple versions of the SDK I finally found the <a href="https://bugs.adobe.com/jira/browse/FB-14007" target="_blank">bug report</a> on Adobe Bugs citing that the problem was fixed in version 3.0.2.</p>
<p>After running Adobe Updater everything worked great!</p>
<p>See the common theme here? I tend to disable most of the automatic software updates since they are usually very annoying. After my experiences over the past week I will be checking Adobe Updater much more frequently! <strong>Always update after a fresh install.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2009/12/27/dont-forget-to-update-your-adobe-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Base64 Encoding BitmapData</title>
		<link>http://www.blackcj.com/blog/2009/12/22/base64-encoding-bitmapdata/</link>
		<comments>http://www.blackcj.com/blog/2009/12/22/base64-encoding-bitmapdata/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 15:24:24 +0000</pubDate>
		<dc:creator>Chris Black</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Base64]]></category>
		<category><![CDATA[BitmapData]]></category>

		<guid isPermaLink="false">http://www.blackcj.com/blog/?p=608</guid>
		<description><![CDATA[Turn your BitmapData into a string and back! Great for storing images in XML, Databases, or transmitting them over a network. This post will cover Bitmap Encoding, PNG Encoding and JPG Encoding along with the pros and cons for each. Bitmap Encoding - (link) PLAIN TEXT Actionscript: // Encode var encoded:String = BitmapEncoder.encodeBase64&#40;bitmap.bitmapData&#41;; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Turn your BitmapData into a string and back! Great for storing images in XML, Databases, or transmitting them over a network. This post will cover Bitmap Encoding, PNG Encoding and JPG Encoding along with the pros and cons for each.<br />
<br/></p>
<h3>Bitmap Encoding - (<a href="http://www.foxarc.com/blog/article/56.htm" target="_blank">link</a>)</h3>
<div class="igBar"><span id="lactionscript-4"><a href="#" onclick="javascript:showPlainTxt('actionscript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-4">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Encode</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> encoded:<span style="color: #0066CC;">String</span> = BitmapEncoder.<span style="color: #006600;">encodeBase64</span><span style="color: #66cc66;">&#40;</span>bitmap.<span style="color: #006600;">bitmapData</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Decode</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> bd:BitmapData = BitmapEncoder.<span style="color: #006600;">decodeBase64</span><span style="color: #66cc66;">&#40;</span>encoded<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
<strong>Advantages:</strong><br />
Keep transparency<br />
Fastest Method<br />
Does not require a Loader</p>
<p><strong>Disadvantages:</strong><br />
Largest Filesize<br />
Will only work with images up to a certain size<br />
<br/></p>
<h3>PNG Encoding - (<a href="http://code.google.com/p/as3corelib/" target="_blank">link</a>)</h3>
<div class="igBar"><span id="lactionscript-5"><a href="#" onclick="javascript:showPlainTxt('actionscript-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-5">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Encode&nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> ba:ByteArray = PNGEncoder.<span style="color: #006600;">encode</span><span style="color: #66cc66;">&#40;</span>bitmap.<span style="color: #006600;">bitmapData</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> encoded:<span style="color: #0066CC;">String</span> = Base64.<span style="color: #006600;">encodeByteArray</span><span style="color: #66cc66;">&#40;</span>ba<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Decode&nbsp; &nbsp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> decoded:ByteArray = Base64.<span style="color: #006600;">decodeToByteArray</span><span style="color: #66cc66;">&#40;</span>encoded<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> loader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">loader.<span style="color: #006600;">loadBytes</span><span style="color: #66cc66;">&#40;</span>decoded<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Advantages:</strong><br />
Keep transparency<br />
Smaller filesize than Bitmap Encoding</p>
<p><strong>Disadvantages:</strong><br />
Slower than Bitmap Encoding<br />
Larger than JPG Encoding<br />
Requires Loader<br />
<br/></p>
<h3>JPG Encoding - (<a href="http://code.google.com/p/as3corelib/" target="_blank">link</a>)</h3>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-6">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Encode</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> jpgEncoder:JPGEncoder = <span style="color: #000000; font-weight: bold;">new</span> JPGEncoder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> ba:ByteArray = jpgEncoder.<span style="color: #006600;">encode</span><span style="color: #66cc66;">&#40;</span>bitmap.<span style="color: #006600;">bitmapData</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> encoded:<span style="color: #0066CC;">String</span> = Base64.<span style="color: #006600;">encodeByteArray</span><span style="color: #66cc66;">&#40;</span>ba<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Decode</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> decoded:ByteArray = Base64.<span style="color: #006600;">decodeToByteArray</span><span style="color: #66cc66;">&#40;</span>encoded<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> loader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">loader.<span style="color: #006600;">loadBytes</span><span style="color: #66cc66;">&#40;</span>decoded<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
<strong>Advantages:</strong><br />
Smallest Filesize<br />
Variable Quality</p>
<p><strong>Disadvantages:</strong><br />
Slower than Bitmap Encoding<br />
No Transparency<br />
Requires Loader</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackcj.com/blog/2009/12/22/base64-encoding-bitmapdata/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.502 seconds -->
