djvumake

Assemble DjVu files.
Synopsis
       % djvumake <djvufile> [...<arguments>...]
    

Description

This command assembles a single-page DjVu file by copying or creating chunks according to the provided <arguments>. Supported syntaxes for <arguments> are as follows:
{INFO=<w>,<h>,<dpi>} Creates the initial ``INFO'' chunk. Arguments w, h and dpi describe the width, height and resolution of the image. All arguments may be omitted. The default resolution is 300 dpi. The default width and height will be retrieved from the first mask chunk specified in the command line options.
{Sjbz=<jb2file>} Creates a JB2 mask chunk. File jb2file may contain raw JB2 data or be a DjVu file containing JB2 data, such as the files produced by cjb2.
{Smmr=<mmrfile>] } Creates a mask chunk containing MMR/G4 data. File mmrfile may contain raw MMR data or be a DjVu file containing MMR data.
{BG44=<iw44file>:<n>} Creates one or more IW44 background chunks. File IW44 file such as the files created by c44. The optional argument n indicates the number of chunks to copy from the IW44 file.
{BGjp=<jpegfile>} Creates a JPEG background chunk.
{BG2k=<jpegfile>} Creates a JPEG-2000 background chunk.
{FG44=<iw44file>} Creates one IW44 foreround chunks. File IW44 file such as the files created by c44. Only the first chunk will be copied.
{FGbz=<bzzfile>} Creates a chunk containing colors for each JB2 encoded object. Such chunks are created using class DjVuPalette. See program cpaldjvu for an example.
{FGjp=<jpegfile>} Creates a JPEG foreground chunk.
{FG2k=<jpegfile>} Creates a JPEG-2000 foreground chunk.
{PPM=<ppmfile>} Create IW44 foreground and background chunks by masking and subsampling PPM file ppmfile. This is used by program cdjvu.

Let us assume now that you have a PPM image "myimage.ppm" and a PBM bitonal image "mymask.pbm" whose black pixels indicate which pixels belong to the foreground. Such a bitonal file may be obtained by thresholding, although more sophisticated techniques can give better results. You can then generate a Compound DjVu File by typing:

       % cjb2 mymask.pbm mymask.djvu
       % djvumake mycompound.djvu Sjbz=mymask.djvu PPM=myimage.ppm
    

Author:
Léon Bottou <leonb@research.att.com>
Patrick Haffner <haffner@research.att.com>
Version:
$Id: djvumake.html,v 1.6 2000/11/02 02:17:04 bcr Exp $

Alphabetic index Hierarchy of classes


DjVu is a trademark of AT&T.
All other products mentioned are registered trademarks or trademarks of their respective companies.