Introducing ZaaIL – 40+ Image format support for Flash

:: UPDATE ::

We’re currently are testing a new Image Parser called ZaaTiff, we need your help.


Recently, I’ve been doing a lot of work with images and bitmaps… and I grew very frustrated with the lack of image support built into the player. After a having a conversation with my friend Ben Garney of PushButton Labs he pointed me to an open source image library in C called DevIL (originally OpenIL).

Today I’m extremely excited to announce that by using Adobe’s Alchemy toolset we have a working port of DevIL on the Adobe Flash Platform! This means that we now have support for 40+ image formats in the Flash Player. And yes… it works in both Adobe AIR as well as Flash Player.

The port was done by Aaron Boushley and Nate Beck of ZaaLabs.

Best news of all… we are releasing ZaaIL under the MIT License!

Supported Formats

  • Blizzard game textures – .blp
  • Windows Bitmap – .bmp
  • Multi-PCX – .dcx
  • DirectDraw Surface – .dds
  • Dicom – .dicom, .dcm
  • Flexible Image Transport System – .fits, .fit
  • Graphics Interchange Format – .gif
  • Radiance High Dynamic – .hdr
  • Macintosh icon – .icns
  • Windows icon/cursor – .ico, .cur
  • Interchange File Format – .iff
  • Interlaced Bitmap – .lbm, .ilbm
  • Infinity Ward Image (doesn’t work with MW2 iwi files) – .iwi
  • Jpeg – .jpg, .jpe, .jpeg
  • Jpeg 2000 – .jp2
  • Homeworld texture – .lif
  • Half-Life Model – .mdl
  • MPEG-1 Audio Layer 3 (Amazon MP3s work, Apple’s do not) – .mp3
  • Kodak PhotoCD – .pcd
  • ZSoft PCX – .pcx
  • Softimage PIC – .pic
  • Alias | Wavefront – .pix
  • Portable Network Graphics – .png
  • Portable Anymap – .pbm, .pgm, .pnm, .pnm
  • Adobe PhotoShop – .psd
  • PaintShop Pro – .psp
  • Pixar – .pxr
  • Raw data – .raw
  • Homeworld 2 Texture – .rot
  • Silicon Graphics – .sgi, .bw, .rgb, .rgba
  • Sun Microsystems, .sun
  • Creative Assembly Texture – .texture
  • Truevision Targa – .tga
  • Tagged Image File Format – .tif
  • Gamecube Texture – .tpl
  • Unreal Texture – .utx
  • Valve Texture Format – .vtf
  • Game Archive – .wad
  • Quake 2 Texture – .wal
  • Wireless Bitmap File Format – .wbmp
  • HD Photo – .wdp, .hdp
  • X Pixel Map – .xpm
  • Doom Graphics

Features currently supported:

This is just our first cut of ZaaIL, therefore it is not on full parity with the features in DevIL yet (it may never be)… but it’s a start.

  • Decoding 40+ image formats
  • Access to the image bitmap data

Features planning to be supported:

  • Support for encoding bitmap data to 20+ image formats
  • Palette swapping

Get It Here

See it in action

We’re planning to put ZaaIL up on GitHub.

ZaaIL is now available on GitHub

ZaaIL on GitHub

Test Images for ZaaIL on GitHub

You can still download the source –> here.

Tags: , , , ,

75 Responses to “Introducing ZaaIL – 40+ Image format support for Flash”

  1. mike April 20, 2010 at 8:39 pm #

    great work!

  2. Mario Klingemann April 20, 2010 at 8:50 pm #

    Wow – that looks very useful indeed. Thanks a lot for porting it!

  3. Adi Nugroho April 20, 2010 at 9:07 pm #

    Wow, brilliant, excellent work. Thanks so much for porting and sharing it.

  4. Philip Bulley April 20, 2010 at 9:09 pm #

    Loving the opportunities alchemy brings to the platform! Nice work 🙂

  5. Xavi Beumala April 20, 2010 at 9:44 pm #

    Amazing work! Thanks for sharing!

  6. peter kaptein April 20, 2010 at 10:04 pm #

    Amazing. Great work!

  7. Justin Putney April 21, 2010 at 12:54 am #

    Awesome! Nice work!

  8. James April 21, 2010 at 1:18 am #

    Wow, I’ve been waiting for someone to figure this stuff out! Thank you!

  9. nico April 21, 2010 at 7:04 am #

    nice, but the sample doesn’t work with jp2 file format.

  10. natebeck April 21, 2010 at 7:11 am #


    Hey Nico, thanks for stopping by!

    We don’t have copies of every file format to test with. Could you send your jp2 file to info [at] zaalabs [dot] com? I’ll make sure to get it working.


  11. Weyert April 21, 2010 at 7:40 am #

    Exciting and promising library. Great, now I only need to find a reason to use it…

  12. Nicolas Noben April 21, 2010 at 8:01 am #

    Amazing work. That will come in really handy. PSD files in flash? wow!

  13. Ferdi Koomen April 21, 2010 at 9:29 am #

    Great library, just wow! Thanks for sharing this with the community. What was the hardest part in porting DevIL to Alchemy?

    • natebeck April 21, 2010 at 2:54 pm #


      We documented the whole process of porting DevIL, and will be releasing a series of posts walking through it. But the hardest part I would say was figuring out how to link in the dependencies: libjpg, libpng, etc…


      • JohnK May 6, 2011 at 11:49 pm #

        Yeah… I used DevIL in a game engine during college. Getting all of it to link properly was a major pain. Good work with this man.

  14. giggsy April 21, 2010 at 9:34 am #

    Sweet! DDS support could get interesting 🙂

  15. flashg April 21, 2010 at 11:07 am #

    Great work! Thanks for porting and sharing!

  16. Moses Gunesch April 21, 2010 at 12:22 pm #

    Wow, great work guys! We’ve been working on a resizing uploader utility and this might provide some great new capabilities. Quick note on the demo (on Intel Mac) – .tif / .tiff files are not selectable in the file browser.

    My main point of curiosity is which of these formats are actually used, say by professional photographers. Tiff and PSD are two that stand out (and we’d probably throw in BMP for good measure). Besides maybe Targa or Pixar I’m not sure if any of these other formats get any play? Which is not to say that having them wouldn’t be super useful in specific cases! Just asking if you guys have any recommendations on formats that might get used quite often but just aren’t as well known?

    My other question regards Tiff and BMP – there are already a few decoders for these online, but none of them has fully finished the job of handling all the various types of compression that can be used within these formats. We wouldn’t want to enable them in the browse dialog if there’s a partial chance of failure at the decoding step. Any specifics on the range of your Tiff and BMP support would be much appreciated.

    Thanks again, really great project!

  17. Moses Gunesch April 21, 2010 at 12:37 pm #

    A couple more comments:

    I know pro photographers probably use a lot of different RAW formats (.raw is not common, it’s simply Panasonic raw – see, but not sure Flash would be able to handle processing such large files.

    In general one of my biggest concerns with being able to load images into Flash for decoding is memory management. There’s not any reliable way for the player to sense when it’s running out of memory, and there’s a risk of crashing the user’s browser from overloading it. It’s nice to say that Tiff is supported, and it may work well on most computers, but a low-RAM system might barf. That’s a hard one to test as well.

    There is an open source RAW decoder that I wanted to bring to your attention in case it’s something you’re considering experimenting with.

    • natebeck April 21, 2010 at 3:07 pm #


      Thanks for stopping by and for the great comments.

      Quick note on the demo (on Intel Mac) – .tif / .tiff files are not selectable in the file browser.

      It seems like we forget to link in libtiff to that version of the swc.

      Just asking if you guys have any recommendations on formats that might get used quite often but just aren’t as well known?

      ZaaIL actually came together out of a need for multiple file support for game development tooling on the Flash platform. As you can see many of the supported formats deal with games. Obviously this is one of those situations where one man’s trash is another man’s treasure. 🙂

      In general one of my biggest concerns with being able to load images into Flash for decoding is memory management.

      You’re absolutely right! We haven’t done much yet in terms of performance, error handling and optimizations. That’s next on the list of things to do with ZaaIL. That and encoding support.


  18. Aaron Boushley April 21, 2010 at 4:30 pm #


    Personally I thought the hardest part was finding my way around all the bugs. That’s why we’re releasing the post, to show others how to navigate the maze of bugs.

    Linking in the other libraries statically was definitely an interesting thing to attempt, since I’m not very familiar with C’s linking step. And the reason we can’t use normal shared libraries is due to another bug!

    Alchemy is great, but it could definitely use some polish work.

  19. moses gunesch April 22, 2010 at 10:35 am #

    Thanks for the replies Nate. And hi from my boy Jolma 🙂

  20. nico April 23, 2010 at 2:59 am #

    I sent jp2 images 2 days ago. Did you receive it?

  21. Eric April 23, 2010 at 3:12 pm #

    Dicom doesn’t seem to work.

    • Nate Beck April 23, 2010 at 3:14 pm #


      Can you please send the Dicom file to info [at] zaalabs [dot] com.

      We’re currently collecting all formats so we can test properly. We dont’ have dicom files yet.


  22. Boris April 28, 2010 at 7:08 am #

    double thumbs up!!

  23. Mathieu Gosselin April 29, 2010 at 2:23 am #


    “Features planning to be supported:
    * Support for encoding bitmap data to 20+ image formats”

    Wow that would be amazing! Will it include multilayered files ? like multilayered psd or multilayered PNG. I would be very interested in that!
    Else Great work guys!

    I guess the next step now is to be able to export from flash using vector formats like SVG or illustrator files etc…!

  24. Justin Ohms July 7, 2010 at 1:18 pm #

    Looks great and would love to use it. Where is the source for the swc?

  25. Justin Ohms July 7, 2010 at 1:30 pm #

    … lol never mind found your Alchemy 3 part post…. now the fun begins.

  26. Vineet July 21, 2010 at 7:43 am #


    I was looking for support of 16 bit tiff images but couldnt load them. Since this is kinda urgent, could you offer some help?

  27. Aaron Boushley July 21, 2010 at 10:10 am #

    Hey Vineet,

    I believe the current ZaaIL only has support for 32bit images. There are tutorials on this website that walk you through how we built the swc (the first in the series can be found here There is a point where we have to pass the number of bits per pixel.

    Right now our plates are pretty full at ZaaLabs, and the Alchemy projects are experimental and thus time consuming. If you want to discuss hiring us to help you on this, send us some mail through the contact page.


  28. juZt August 10, 2010 at 1:58 pm #

    i need to load tiff images, plis help meee!!!!!!

    • Nate Beck August 10, 2010 at 2:03 pm #

      Hey juZt, as Aaron mentioned above.

      There are tutorials on this website that walk you through how we built the swc (the first in the series can be found here …

      Right now our plates are pretty full at ZaaLabs, and the Alchemy projects are experimental and thus time consuming. If you want to discuss hiring us to help you on this, send us some mail through the contact page.


  29. Stu September 20, 2010 at 9:05 am #

    Does it do animated gifs?
    The test app doesn’t seem to animate it

  30. Richard October 6, 2010 at 9:11 am #

    The image loading is really really slow… C/C++ code should be faster but I really like the project but it needs to be polished. I found the following runtime errors:
    1) calling lib.ilInit();

    RangeError: Error #1506: The specified range is invalid.
    at cmodule.zaail::FSM_imalloc$/start()
    at cmodule.zaail::FSM_pubrealloc/work()
    at Function/()
    at Function/()

    • Nate Beck October 6, 2010 at 10:13 am #


      ZaaIL is not optimized. It was a week long experiment that we published the results on. We currently are not doing any development on it, but that is why we gave away all of the work we did, and wrote a series about how to compile it yourself.


    • Gary March 30, 2011 at 7:59 am #

      I think you are trying to init the lib more than once.

      var libLoader:CLibInit = new CLibInit;
      var library:Object = libLoader.init();

      i’ll get that error usually when i put the above two lines in a loop or call them twice unknowingly.

  31. Saviz October 30, 2010 at 9:01 pm #

    Hi Nate,
    Great work! I was just trying out the example and it didn’t support tiff images. Is this something that is not currently supported in this library.

  32. Paul November 7, 2010 at 8:55 am #

    .tif file is not working… it is possible to get it working? i read somewhere that you forget to embed the tiflib…. i don’t know a lot about alchemy … i don’t know if it would be easy but it would be a awesome add-on for my project.

    Thanks Nate,


  33. Billy November 21, 2010 at 1:11 am #

    Zaail is a amazing tools which can support so many file formats.

    However, when I load a TIFF file, a error ”
    Undefined sym: _TIFFSetWarningHandler
    at Function/()
    at Function/()
    at ImageConverter/onFileLoaded

    Even I download the test TIFF files from GitHub, the same error happens. Any thing needs to modify to support TIFF ?

    Please advise.



  34. Tom Van den Eynde December 19, 2010 at 6:12 am #

    Very interesting but DICOM doesn’t seem to work… I think a lot of hospitals could be interested.

  35. pilihou March 1, 2011 at 8:14 am #

    Why can not open the file name with Chinese?

  36. Chris May 27, 2011 at 4:24 am #

    awesome. No animated gif’s though 🙁

  37. David Jones July 12, 2011 at 8:54 am #

    Awesome project man, you should definitely support adobes .atf format too when it gets released

  38. Tristan October 26, 2011 at 1:49 pm #

    I have this error with a JPEG is loaded by zaail:
    Error: Error # 1502: The execution time of a script exceeds the default time (15 seconds).
    at cmodule.zaail: FSM_ilConvertBuffer / work ()
    at Function / ()
    at Function / ()
    at net.primaire:: upload / onFileLoaded ()

    Someone has the same?
    What is the solution?
    thank you

  39. Martin November 9, 2011 at 12:38 pm #


    Any plan to support OpenEXR soon throught the ZaaIL package? DevIl already support it.

  40. Bruno Fenzl February 14, 2012 at 12:20 pm #

    Hello Zaa Team!

    First thanks for this library and the original code, it comes really handy!!

    I have a memory leak and would like to know if there is any way to explicitly release memory.
    Any method? or is there any docs? I couldn’t find any…

    Thanks in advance!

  41. renderhjs June 27, 2012 at 7:36 am #

    I think this library caches files, Meaning if files change outside of flash it loads them in the state it loaded them before – so it doesn’t work with files that change 🙁
    Anyone else noticing this?

    • nate June 27, 2012 at 9:50 pm #

      Since this was a weekend project, I don’t recommend using this in production.

      However, you could work around your problem by modifying your loader.supplyFile call. Subsequent calls to the supplyFile with the same string will not overwrite the bytes set in that space. Just change to something else if you want to reload an image, the only thing that matters that the first parameter of supplyFile matches the parameter you pass into ilLoadImage.

      loader.supplyFile("foo", fileContents);

      • renderhjs June 28, 2012 at 2:49 am #

        I used an id of: + “_” + file.modificationDate.toString();
        and that seems to work, just worries me a bit that it doesn’t flush the bytes it loaded. Btw. I am using this for ShoeBox to load in mainly PSD’s as it simplified the workflow as opposed to exporting assets to PNG assets for example.

        do you have any references on how to construct or create a PSD file with slices or guide lines? any of those meta data that could be set. I’d like to use the PSD parser to generate PSD files with pre-set slices.


  1. ImageConverter – ZaaIL Example | ZaaLabs - April 20, 2010

    […] ZaaIL (see our other post), we are now able to support the loading of around 40 image formats directly into […]

  2. uberVU - social comments - April 20, 2010

    Social comments and analytics for this post…

    This post was mentioned on Twitter by __ted__: 40 new Image formats for Flash! #PSD #BMP #RAW #TGA #Alchemy…

  3. Tweets that mention Introducing ZaaIL – 40+ Image format support for Flash | ZaaLabs -- - April 20, 2010

    […] This post was mentioned on Twitter by Mike Chambers, Chad Udell, Skial Bainn, Greg Brant, Nate Beck and others. Nate Beck said: RT @__ted__: 40 new Image formats for Flash! #PSD #BMP #RAW #TGA #Alchemy […]

  4. Introducing ZaaIL – 40+ Image format support for Flash | ZaaLabs « Netcrema – creme de la social news via digg + delicious + stumpleupon + reddit - April 20, 2010

    […] Introducing ZaaIL – 40+ Image format support for Flash | […]

  5. Load 40 image formats into Flash. Oh, and it’s open source. | Nate Beck - Adobeholic - April 20, 2010

    […] 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 […]

  6. 支持超过40种图片格式的AS3类库 « asblog - April 21, 2010

    […] 演示: 代码: 原文地址: […]

  7. zaail เพิ่มพลังให้แฟลช ซัพพอร์ต format ภาพกว่า 40 ชนิด | HowDoFlash - April 21, 2010

    […] ไปอ่านจากต้นฉบับได้ที่ […]

  8. ZaaIL Soporte +40 formatos de imagen en Flash | - April 22, 2010

    […] Soporte +40 formatos de imagen en Flash De la mano de ZaaLabs, encontramos esta libreria desarrollada en flash que nos permite cargar hasta 40 formatos de imagen […]

  9. Twitter Weekly Updates for 2010-04-25 - April 25, 2010

    […] reading […]

  10. ZaaIL 支持40多种图片格式的AS3类库 « 达达's Blog - April 25, 2010

    […] 官方页面: 源码下载: 实例查看: […]

  11. Link: Introducing ZaaIL – 40+ Image format support for Flash | Psyked - April 28, 2010

    […] […]

  12. ZaaIL 支持40多种图片格式的AS3类库 « 9RIA.Com 天地会博客聚合 - May 6, 2010

    […] 官方页面: 源码下载: 实例查看: […]

  13. ZaaIL 支持40多种图片格式的AS3类库 : : 9RIA.Com 天地会博客聚合 - May 11, 2010

    […] 官方页面: 源码下载: 实例查看: […]

  14. AS3 Code Libraries (APIs) – Joe's private place - May 13, 2010

    […] […]

  15. Librerie AS3 | - May 19, 2010

    […] ZaaIL – 40+ Image format support for Flash […]

  16. ZaaIL adds support for 40+ image format to Flash | - flash world - May 27, 2010

    […] Zaalabs yesterday announced the release of an opensource ( under MIT license ) library, written using Alchemy, which will allow swf to load at runtime more than 40 different image formats ( you will have access to the bitmapdata of the loaded file ). This is indeed a great news ( I’m thinking in particular to the benefits it can have for us at Aviary )! This actionscript library is a porting of the DevIL library. And in fact reading at the features list of the DevIL library you can see that a lot of image formats are currently supported:  […]

  17. Alchemy project from Adobe Labs « Tournas Dimitrios - July 17, 2010

    […] in both Adobe AIR as well as Flash Player.The port was done by Aaron Boushley and Nate Beck of ZaaLabs.ZaaIL is released  under the MIT License! About […]

  18. Adrian Sule - My random thoughts on Flash and Flex » Collection of libraries - September 20, 2010

    […] ZaaIL – 40+ Image format support for Flash […]

  19. TouchLibs » Blog Archive » AS3 Code Libraries (APIs) - December 15, 2010

    […] ZaaIL – 40+ Image format support for Flash […]

  20. AS3 CODE Library (API) - Mijimiji Blog - January 3, 2011

    […] ZaaIL – 40+ Image format support for Flash […]

  21. ZaaIL « AS3开源大全 - January 11, 2011

    […] 相关内容: […]

  22. Flex Library – Charger plus de 40 formats de fichier image avec ZaaIL - Adobe Flex Tutorial - Tutoriaux Flex Builder, MXML, ActionScript, AS3 - May 25, 2011

    […] […]

  23. ActionScript Фреймворк | НОВОЕ ИЗМЕРЕНИЕ - October 31, 2011

    […] ZaaIL – поддержка 40+ форматов изображений. […]

Leave a Reply