by Christian Cantrell

 Comments (13)

Created

August 17, 2006

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.

COMMENTS

  • By Dominick - 4:31 PM on August 17, 2006   Reply

    Thanks Christian, great work!

  • By dmendels - 5:46 PM on August 17, 2006   Reply

    Nice. Not sure if you noticed, but James just posted an app that shows this in use:http://www.cayambe.com/wordpress/?p=66Great stuff._David

  • By weni - 6:54 PM on August 17, 2006   Reply

    change all “int” to “Number”,it will faster

  • By Matt Rix - 8:08 PM on August 17, 2006   Reply

    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

  • By sascha of H1DD3N.R350URC3 - 8:15 PM on August 21, 2006   Reply

    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.

  • By sascha of H1DD3N.R350URC3 - 8:22 PM on August 21, 2006   Reply

    … Besides on Firefox it also copies the line numbers so it’s completely in vain.

  • By sh0ckwav - 11:43 AM on August 24, 2006   Reply

    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.

  • By sascha of H1DD3N.R350URC3 - 5:41 AM on August 27, 2006   Reply

    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?

  • By Christian Cantrell - 2:48 PM on August 28, 2006   Reply

    For those of you having trouble getting Labs code, see this post:http://weblogs.macromedia.com/cantrell/archives/2006/08/how_to_get_code.cfmAll is explained.Christian

  • By andrea - 11:33 AM on September 21, 2006   Reply

    download works fine now! thxgreetz andreap.s.: next time call it a “download contest” and give hints like in an adventure game.working title: “distaction for the stressed out developer” ;-)

  • By Andrew Paul Simmons - 6:52 PM on May 24, 2007   Reply

    Very helpful. This stuff should be posted in more places. Also, more mention should be made of the as3corelib! This is very useful stuff.

  • By Marcus - 7:29 PM on August 21, 2007   Reply

    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 herehttp://labs.adobe.com/svn/flashplatform/?/projects/corelib/trunk/src/actionscript3/com/adobe/images/

  • By Yuri Visser - 3:13 AM on October 24, 2007   Reply

    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 ;)

ADD A COMMENT