Thursday, May 24, 2007

Save JPEG or PNG in ActionScript 3.0.

In order to make the Apollo application APS LightTable practical, it had be able to modify images from the local hard drive and then send them to the server without increasing the image's file size. To do this I was required to perform PNG or JPEG compression within the LightTable application. The problem of JPEG/PNG encoding in the Flash Player appears to be solved by Adobe Labs as3corelib!

If you are looking for a way to send images that the user has created in the Flash Player without consuming huge amounts of bandwidth it is now possible! Also, if you need to save user created/modified images to disk from an Apollo application, it is now possible to save them in the formats your users are familiar with. I have posted links below:

Download the as3corelib which contains these encoder classes.
Warning: The as3corelib may NOT be as up to date as the direct links below which take you directly into the as3corelib svn.

Adobe ActionScript 3.0 JPEG encoder

Adobe ActionScript 3.0 PNG encoder

Labels: ,

0 Comments:

Post a Comment

<< Home