JBGTOPBM(1)                 General Commands Manual                JBGTOPBM(1)

NAME
       jbgtopbm - JBIG1 to portable bitmap file converter

SYNOPSIS
       jbgtopbm [ options ] [ input-file | -  [ output-file ]]

DESCRIPTION
       Reads in a JBIG1 bi-level image entity (BIE), decompresses it, and out-
       puts a portable bitmap (PBM) file.

       JBIG1 is a highly effective lossless compression algorithm for bi-level
       images  (one bit per pixel), which is particularly suitable for scanned
       document pages.

       A JBIG1 encoded image can be stored in several resolutions  in  one  or
       several  BIEs.  All  resolution layers except the lowest one are stored
       efficiently as differences to the next lower resolution layer.  Options
       -x  and -y can be used to stop the decompression at a specified maximal
       output image size. With option -m the input file can consist of  multi-
       ple  concatenated  BIEs  which  contain different increasing resolution
       layers of the same image.

       If more than one bit per pixel is stored in the JBIG1 file, then a  PGM
       file will be produced.

OPTIONS
       -           A  single  hyphen  instead of an input file name will cause
                   jbgtopbm to read the data from standard  input  instead  of
                   from a file.

       -x number   Decode  only  up  to  the  largest resolution layer that is
                   still not more than number pixels wide. If no such  resolu-
                   tion layer exists, then use the smallest one available.

       -y number   Decode  only  up  to  the  largest resolution layer that is
                   still not more than number pixels high. If no such  resolu-
                   tion layer exists, then use the smallest one available. Op-
                   tions  -x  and  -y can also be used together, in which case
                   the largest layer that satisfies both limits  will  be  se-
                   lected.

       -m          Process multiple concatenated BIEs. If there are bytes left
                   after the final SDE in the first BIE, then with this option
                   jbgtopbm  will  attempt to decode these as the start of an-
                   other BIE that may contain  higher  resolution  data.  Nor-
                   mally, any remaining bytes will generate a warning message.

       -b          Use  binary  values  instead of Gray code words in order to
                   decode pixel values from multiple bit planes.  This  option
                   has only an effect if the input has more than one bit plane
                   and  a  PGM output file is produced.  Note that the decoder
                   has to be used in the same mode as the encoder  and  cannot
                   determine  from  the  BIE whether Gray or binary code words
                   were used by the encoder.

       -d          Diagnose a single BIE.  With  this  option,  jbgtopbm  will
                   print  a summary of the header information found in the in-
                   put file, followed by a list of all PSCD and ESC marker se-
                   quences encountered until the end of the file is reached.

       -p number   If the input contains multiple  bit  planes,  then  extract
                   only  the  specified  single plane as a PBM file. The first
                   plane has number 0.

BUGS
       Using standard input and standard output for binary data works only  on
       systems  where  there  is no difference between binary and text streams
       (e.g., Unix). On other systems (e.g., Windows), using standard input or
       standard output may cause control characters like CR or LF  to  be  in-
       serted or deleted, which will damage the binary data.

STANDARDS
       This  program  implements the JBIG1 image coding algorithm as specified
       in international standard ISO/IEC 11544:1993 and  ITU-T  Recommendation
       T.82(1993).

AUTHOR
       Markus Kuhn wrote JBIG-KIT, which includes jbgtopbm.

SEE ALSO
       pbm(5), pgm(5), pbmtojbg(1)

                                  2026-10-09                       JBGTOPBM(1)
