Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/ape/lib/jbig/pbmtools/jbgtopbm.1

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH JBGTOPBM 1 "2003-06-04"
.SH NAME
jbgtopbm \- JBIG1 to portable bitmap file converter
.SH SYNOPSIS
.B jbgtopbm
[
.I options
]
[
.I input-file
| \-  [
.I output-file
]]
.br
.SH DESCRIPTION
Reads in a 
.I JBIG1
bi-level image entity (BIE) from a file or standard
input, decompresses it, and outputs a portable bitmap (PBM) file.

.I 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
.I 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
.BI -x
and
.BI -y
can be used to stop the decompression at a specified maximal output
image size. With option
.BI -m
the input file can consist of multiple 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.
.SH OPTIONS
.TP 14
.BI \-
A single hyphen instead of an input file name will cause 
.I jbgtopbm
to read the data from standard input instead from a file.
.TP
.BI \-x " number"
Decode only up to the largest resolution layer which is still not
more than
.I number
pixels wide. If no such resolution layer exists, then use the smallest
one available.
.TP
.BI \-y " number"
Decode only up to the largest resolution layer which is still not
more than
.I number
pixels high. If no such resolution layer exists, then use the smallest
one available. Options
.BI \-x
and
.BI \-y
can also be used together in which case the largest layer that satisfies
both limits will be selected.
.TP
.BI \-m
Process multiple concatenated BIEs. If there are bytes left after the
final SDE in the first BIE, then with this option
.I jbgtopbm
will attempt to decode these as the start of another BIE that may
contain higher resolution data. Normally, any remaining bytes will
generate a warning message.
.TP
.BI \-b
Use binary values instead of Gray code words in order to decode pixel
values from multiple bitplanes. This option has only an effect if the
input has more than one bitplane 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.
.TP
.BI \-d
Diagnose a single BIE. With this option,
.I jbgtopbm
will print a summary of the header information found in the input
file, followed by a list of all PSCD and ESC marker sequences
encountered until the end of the file is reached.
.TP
.BI \-p " number"
If the input contains multiple bitplanes, then extract only the
specified single plane as a PBM file. The first plane has number 0.
.SH 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., MS-DOS), using standard input or
standard output may cause control characters like CR or LF to be
inserted or deleted and this will damage the binary data.
.SH STANDARDS
This program implements the
.I JBIG1
image coding algorithm as specified in ISO/IEC 11544:1993 and
ITU-T T.82(1993).
.SH AUTHOR
The
.I jbgtopbm 
program is part of the 
.I JBIG-KIT
package, which has been developed by Markus Kuhn.
The most recent version of this
portable
.I JBIG1
library and tools set is available from
<http://www.cl.cam.ac.uk/~mgk25/jbigkit/>.
.SH SEE ALSO
pbm(5), pgm(5), pbmtojbg(1)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.