as3djvu


DjVu Decoder for Flex/ActionScript 3

Flex/ActionScript DjVu Rendering Library (as3djvu)

as3djvu is a library supporting decoding and rendering of DjVu files in ActionScript 3 and Flex based projects. DjVu is an excellent compression method for scanned documents which generally outperforms PDF and JPEG formats.

It is a port of JavaDjVu available here.

Details

The library includes support for * Decoding and rendering DjVu bitonal, grayscale and full color images * Decoding IW44 and JB2 compressions * Decodes directly from a remote URL source

Status

NOT FUNCTIONING PROPERLY * Rendered images are severely distorted, if rendered at all. * Need to break decoding into a more asycnhronous process in order to avoid the 15 second processing timeout limitation in Flash Player 9.

The current problems with the library are: * Variable typing. The java code relies on specific properties of the java variable types which do not always map exactly to ActionScript. At some point, I suspect variables are loosing precision which is causing the distortions. * Flash Player timeout. FP9 is single threaded. The decompression process is slow on FP9 and can exceed the 15 second timeout. If the decompression is broken into smaller chunks and executed asycnhronously with a AS3 Timer, this limit can be worked around.

On the positive side, * The code compiles with no errors. * The code is clean. * Flash Player 10. Hopefully full GPU support in FP10 will allow for faster render times.

Goals

  • Provide component necessary for a fully Flex/Flash based DjVu viewer to make millions of pages of DjVu encoded documents available to web users without downloading a plugin.

Help Needed

  • It would be really useful for someone with a better understanding of DjVu internals, or at least an ability to understand the DjVu whitepapers, to review the internals of the codec.
  • Also, some expertise regarding optimizing/accelerating AS3 would be useful, too.

Project Information

Labels:
Flex Flash ActionScript DjVu