« Upcoming Apollo Sessions | Main | How To Get Code From Adobe Labs »
August 17, 2006
ActionScript PNG and JPEG Encoders Updated
In October of 2005, Tinic Uro ported a PNG and a JPEG encoder to ActionScript 3. Shortly after, we added both to the collection of free ActionScript libraries on Adobe Labs. Tinic wrote them for an early alpha release of Flex Builder, so at some point along the line during the evolution of the compiler and the player, they stopped working.
I just checked in new versions of both that now compile and pass simple tests against the Flex 2 release. The PNG encoder is here, and the JPEG encoder is here. Let me know if you find any problems with them.
Posted by cantrell at August 17, 2006 2:11 PM
Comments
Thanks Christian, great work!
Posted by: Dominick at August 17, 2006 4:31 PM
Nice. Not sure if you noticed, but James just posted an app that shows this in use:
http://www.cayambe.com/wordpress/?p=66
Great stuff.
_David
Posted by: dmendels at August 17, 2006 5:46 PM
change all "int" to "Number",it will faster
Posted by: weni at August 17, 2006 6:54 PM
You can see Tinic's encoding code in action on my Flex Derby project, Artmatic. http://matt-rix.com/fd/artmatic/
Check it out, let me know what you think... I'm not even sure it works with the Flash 9 release player :P
Posted by: Matt Rix at August 17, 2006 8:08 PM
Very cool but can you put these files up as usual download links? When trying to copy and paste the code, the formatting and tabs are completely messed up.
Posted by: sascha of H1DD3N.R350URC3 at August 21, 2006 8:15 PM
... Besides on Firefox it also copies the line numbers so it's completely in vain.
Posted by: sascha of H1DD3N.R350URC3 at August 21, 2006 8:22 PM
Am I the only one getting errors with the JPGEncode class? Which didn't appear to be updated in the latest flashplatform.zip. Is BitString still a class in AS3? I think that needs to be addressed for this to work properly.
Posted by: sh0ckwav at August 24, 2006 11:43 AM
Whats the deal? I'm trying to copy these classes now since a few days but it seems nobody took notice that they cannot be downloaded (I'm getting here.html). And copy/paste doesn't work. In Firefox it copies the line numbers too and in IE the code is still messed up that not even Flash 9 Public Alpha can reformat it.
Anyone cares to correct this?
Posted by: sascha of H1DD3N.R350URC3 at August 27, 2006 5:41 AM
For those of you having trouble getting Labs code, see this post:
http://weblogs.macromedia.com/cantrell/archives/2006/08/how_to_get_code.cfm
All is explained.
Christian
Posted by: Christian Cantrell at August 28, 2006 2:48 PM
download works fine now! thx
greetz andrea
p.s.: next time call it a "download contest" and give hints like in an adventure game.
working title: "distaction for the stressed out developer" ;-)
Posted by: andrea at September 21, 2006 11:33 AM
Very helpful. This stuff should be posted in more places. Also, more mention should be made of the as3corelib! This is very useful stuff.
Posted by: Andrew Paul Simmons at May 24, 2007 6:52 PM
At first I thought BitString doesnt seem to be valid AS3.
What is going on here?
But then I realised there is a BitString class next to the other adobe classes. (Jpeg and PNG)
You can see the BitString class here
http://labs.adobe.com/svn/flashplatform/?/projects/corelib/trunk/src/actionscript3/com/adobe/images/
Posted by: Marcus at August 21, 2007 7:29 PM
I just completed a tutorial using the AS3 CoreLib JPGEncoder class. You can check it out at www[DOT]theliblab-tutorials[DOT]com.
Any comments greatly appreciated ;)
Posted by: Yuri Visser at October 24, 2007 3:13 AM
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).