Introducing ZaaIL – 40+ Image format support for Flash

Apr 20th, 201050 Comments

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.

About author:

Nate's been playing around and working with Flash since 2001, and has been programming Flex since version 1.5 (2004). Nate is an active contributor to PushButton Engine, manager of the Seattle Flex User Group, contributor to the Flex SDK and a 2010 Adobe ACP for Flash Media Server.

All entries by Nate Beck

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

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

  2. mike says:

    great work!

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

  4. Social comments and analytics for this post…

    This post was mentioned on Twitter by __ted__: 40 new Image formats for Flash! http://bit.ly/aEsMqu #PSD #BMP #RAW #TGA #Alchemy…

  5. [...] 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! http://bit.ly/aEsMqu #PSD #BMP #RAW #TGA #Alchemy [...]

  6. Adi Nugroho says:

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

  7. Loving the opportunities alchemy brings to the platform! Nice work :)

  8. Xavi Beumala says:

    Amazing work! Thanks for sharing!

  9. Amazing. Great work!

  10. [...] 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 [...]

  11. Awesome! Nice work!

  12. James says:

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

  13. nico says:

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

  14. natebeck says:

    @nico

    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.

    Cheers,
    Nate

  15. [...] 演示:http://zaalabs.com/demo/TestZaaIL/ 代码: http://zaalabs.com/demo/TestZaaIL/srcview/index.html 原文地址:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

  16. Weyert says:

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

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

  18. Ferdi Koomen says:

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

  19. giggsy says:

    Sweet! DDS support could get interesting :)

  20. flashg says:

    Great work! Thanks for porting and sharing!

  21. 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!

  22. 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 http://en.wikipedia.org/wiki/Raw_image_format), 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. http://en.wikipedia.org/wiki/Dcraw

  23. natebeck says:

    @Ferdi

    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…

    Cheers,
    Nate

  24. natebeck says:

    @Moses

    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.

    Cheers,
    Nate

  25. @Ferdi

    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.

  26. Thanks for the replies Nate. And hi from my boy Jolma :-)

  27. [...] 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 [...]

  28. nico says:

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

  29. Eric says:

    Dicom doesn’t seem to work.

  30. Nate Beck says:

    @Eric

    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.

    Cheers,
    Nate

  31. [...] 官方页面:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ 源码下载:http://zaalabs.com/demo/TestZaaIL/srcview/index.html 实例查看:http://zaalabs.com/demo/TestZaaIL/ [...]

  32. Boris says:

    double thumbs up!!

  33. wicked!

    “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…!

  34. [...] 官方页面:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ 源码下载:http://zaalabs.com/demo/TestZaaIL/srcview/index.html 实例查看:http://zaalabs.com/demo/TestZaaIL/ [...]

  35. [...] 官方页面:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ 源码下载:http://zaalabs.com/demo/TestZaaIL/srcview/index.html 实例查看:http://zaalabs.com/demo/TestZaaIL/ [...]

  36. [...] ZaaIL – 40+ Image format support for Flashhttp://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

  37. [...] 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:  [...]

  38. Justin Ohms says:

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

  39. Nate Beck says:

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

    Hey Justin,

    The source code is in C, and then ported using Adobe Alchemy. This means the that SWC doesn’t have any actual ActionScript source code. We have a series of posts that talk about this process.

    Compiling ZaaIL With Alchemy Part 1
    Compiling ZaaIL With Alchemy Part 2
    Compiling ZaaIL With Alchemy Part 3

  40. Justin Ohms says:

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

  41. [...] 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 [...]

  42. Vineet says:

    Hi

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

  43. 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 http://www.zaalabs.com/2010/04/compiling-with-alchemy-1/). 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.

    Aaron

  44. juZt says:

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

  45. Nate Beck says:

    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 http://www.zaalabs.com/2010/04/compiling-with-alchemy-1/). …

    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.

    Cheers,
    Nate

Leave a Reply

17 Trackbacks

  1. ImageConverter – ZaaIL Example | ZaaLabs

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

  2. uberVU - social comments

    Social comments and analytics for this post…

    This post was mentioned on Twitter by __ted__: 40 new Image formats for Flash! http://bit.ly/aEsMqu #PSD #BMP #RAW #TGA #Alchemy…

  3. Tweets that mention Introducing ZaaIL – 40+ Image format support for Flash | ZaaLabs -- Topsy.com

    [...] 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! http://bit.ly/aEsMqu #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

    [...] Introducing ZaaIL – 40+ Image format support for Flash | ZaaLabszaalabs.com [...]

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

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

    [...] 演示:http://zaalabs.com/demo/TestZaaIL/ 代码: http://zaalabs.com/demo/TestZaaIL/srcview/index.html 原文地址:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

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

    [...] ไปอ่านจากต้นฉบับได้ที่ http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

  8. ZaaIL Soporte +40 formatos de imagen en Flash | xperiments.es

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

    [...] reading http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

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

    [...] 官方页面:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ 源码下载:http://zaalabs.com/demo/TestZaaIL/srcview/index.html 实例查看:http://zaalabs.com/demo/TestZaaIL/ [...]

  11. Link: Introducing ZaaIL – 40+ Image format support for Flash | Psyked

    [...] http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

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

    [...] 官方页面:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ 源码下载:http://zaalabs.com/demo/TestZaaIL/srcview/index.html 实例查看:http://zaalabs.com/demo/TestZaaIL/ [...]

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

    [...] 官方页面:http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ 源码下载:http://zaalabs.com/demo/TestZaaIL/srcview/index.html 实例查看:http://zaalabs.com/demo/TestZaaIL/ [...]

  14. AS3 Code Libraries (APIs) – Joe's private place

    [...] http://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

  15. Librerie AS3 | ricivt.com

    [...] ZaaIL – 40+ Image format support for Flashhttp://www.zaalabs.com/2010/04/introducing-zaail-40-image-format-support-for-flash/ [...]

  16. ZaaIL adds support for 40+ image format to Flash | sephiroth.it - flash world

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

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