RIA Developer, Flex / Flash, Widgets
Load 40 image formats into Flash. Oh, and it’s open source.
For for those who don’t know, I’m one of two people behind ZaaLabs (the other being Aaron Boushley). Today we released ZaaIL, an Adobe Alchemy port of DevIL an open source C image library.
Built in image support of Adobe Flash Player limits you to 3 image formats: gif, jpg and png. While this has worked well for many, many years… I recently have needed to expand the types of formats that I could use in Flash Player. I should also note that you can absolutely add support for these formats directly in ActionScript using ByteArray. For example Mike Chambers blogged about an AS3 BMP parser.
I was originally looking for support for TGA, BMP and PSD, when my friend Ben pointed me to DevIL and challenged me to port it using Alchemy.
Porting C code using Alchemy is not a very straight forward process, but between Aaron and I… and with help from Ben Garney and Branden Hall… worked our way through it. We plan on a series of blog posts discussing the process of using Alchemy in detail. Hopefully we can garner enough interest in the community around Alchemy to get Adobe to continue work on it.
ZaaIL is being released as open source software (MIT if you’re interested). We will post it all on GitHub when we get the chance.
[sidenote]
I have been asked by a few people if I think Adobe should expand from their three image formats and use something like DevIL in Flash Player… I don’t think they should. Adobe has given us the tools to create really cool things such as ZaaIL. I’d rather the Flash Player team focus on things I find way more important… such as 3D support, mobile performance, hardware accelerated graphics, etc…
[/sidenote]
ZaaIL allows developers to now to load more that 40 different image types… go ahead give it a try, I particularly like using a PSD file or cover art embedded into an MP3 (View source is enabled):
More information can be found over at ZaaLabs.
| Print article | This entry was posted by Nate Beck on April 20, 2010 at 3:42 pm, and is filed under Actionscript, Flex, ZaaLabs. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
about 4 months ago
Nice one, that’s going straight to the pool room. And by pool room, I mean “that skinning-utility AIR app I’m working on”
Looking forward to seeing info on the Alchemisation process
about 4 months ago
Now thats what separates the boys from the men ! [ Head turner for those HTML5 vs Flash debaters ]
about 4 months ago
And fast too! Very nice!
I look forward to the write-up on using Alchemy. I’ve been wanting to encode a library that can read/write JPEG EXIF data forever. Reading the data is easy enough, but writing it … That’s a whole different ball game. And why, when there’s C libraries that do it already?
Looking forward to more from ZaaLabs,
Kevin
about 4 months ago
Great work,
-Santhakumar
about 4 months ago
It work so well but hope I could see GIF animation as well
about 4 months ago
@James
Thibault has a great class for animated GIFs which you can use. http://www.bytearray.org/?p=95
about 4 months ago
@Nate, I seen that years ago, but wanted this functionality into ZaaIL would be ideal.
about 4 months ago
@James
In that case, I’ll add it to list of feature requests.
about 4 months ago
Very cool, I tested it by loading in some PSD files and was amazed at the speed at which it was able to load. Great work.
about 4 months ago
zaalabs is doing some very cool shiiiizzz, keep up the goodness guys!
about 3 months ago
@Nate, Great work !!!
is there also a possibility to use alchemy developing a PDF parser? So that its possible to give an image preview as Bitmap in Flash from an uploaded PDF File ?
I want to integrate PDFs in an AIR APP and the possibility to display PDF in HTMLLoader is very uncomfortable or better said, completely buggy unusable.
Benjamin
about 3 months ago
@Benjamin
I don’t see why you couldn’t use Alchemy to port a C PDF Parser. I’m not aware of any open source C PDF parsers… although to be honest I haven’t really looked hard for one.
PDF is tricky though… because it’s not all Bitmap data. It has support for fonts, text and images.
Anyways, there isn’t any reason you couldn’t do an Alchemy port if the parser existed.
Cheers,
Nate
about 3 months ago
@Nate.
Thanks for your answer. That seems to be very complicated porting a pdf library.
Do you see any other possibilities to bring pdf Files into an AIR app, besides the HTML Loader ?
I know the pdf2swf from swftools, which generates a SWF from a PDF File, but unfortunately there is no swc which can be used directly via AS3 in an application.
about 3 months ago
Crazy. Sexy. Awesome!
about 2 months ago
An excellent work
but doesn’t do LZW compressed TIFFs…
Back to square one…