Decoding DjVu and IW44 images.
Files "DjVuImage.h" and "DjVuImage.cpp" implement the main interface for decoding and rendering DjVu Images or IW44 Images. Class DjVuImage is the central component of this interface. This class provides a decoding function and a few rendering functions. Display programs can call the decoding function from a separate thread. The user interface thread may call the rendering functions at any time. Rendering will be performed using the most recent data generated by the decoding thread. This multithreaded capability enables progressive display of remote images. Program djvutopnm illustrates how class DjVuImage can be used by a single threaded decoder. This program first calls the decoding function and then renders the desired segment of the image.Creating DjVu images --- Class DjVuImage does not provide a direct way to create a DjVu image. The recommended procedure consists of directly writing the required chunks into an IFFByteStream as demonstrated in program djvumake. Dealing with too many encoding issues (such as chunk ordering and encoding quality) would indeed make the decoder unnecessarily complex.
ToDo: Plugin annotations --- Class DjVuAnno should move into another set of source files in order to implement the annotation chunk parser, and to retrieve the hyperlink data structure given a position (x,y).
ToDo: Multi-page Documents --- The proposed multi-page format for DjVu documents may considerably change the decoding interface for this class. The responsibility of supervising the decoding tasks will be transferred to a new class DjVuDocument. Individual streams composing the multi-page document will be processed by a new class DjVuFile. Class DjVuImage will still contain the rendering function, but the DjVu image components will be accessed via pointers to the underlying DjVuFile objects.
ToDo: Layered structure --- Class DjVuImage currently contains an unstructured collection of smart pointers to various data structures. Although it simplifies the rendering routines, this choice does not reflect the layered structure of DjVu images and does not leave much room for evolution. We should be able to do better.
Alphabetic index Hierarchy of classes