slackbuilds_ponce/libraries/jbig2enc/jbig2.1
B. Watson 29ca02bcf1 libraries/jbig2enc: Added (encoder for JBIG2).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2016-11-07 06:10:57 +07:00

197 lines
6.4 KiB
Groff

.\" Man page generated from reStructuredText.
.
.TH JBIG2 1 "2016-11-05" "0.28" "SlackBuilds.org"
.SH NAME
jbig2 \- convert image files to JBIG2 format
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" RST source for jbig2(1) man page. Convert with:
.
.\" rst2man.py jbig2.rst > jbig2.1
.
.\" rst2man.py comes from the SBo development/docutils package.
.
.SH SYNOPSIS
.sp
\fBjbig2\fP [\fI\-options\fP] \fIimagefile\fP > \fIoutput.jb2\fP
.SH DESCRIPTION
.sp
JBIG2 is an image compression standard from the same people who brought
you the JPEG format. It compresses 1bpp (black and white) images only.
.sp
jbig2enc is a library that encodes JBIG2 images.
.sp
\fBjbig2\fP is a command\-line tool that uses the jbig2enc library to convert an
image to the JBIG2 format. \fIimagefile\fP can be in any format readable by
leptonica (png, jpeg, tiff, gif, webp, jp2, bmp, pnm, spix). The image
is converted to 1bbp (monochrome) before processing.
.sp
Without the \fI\-p\fP, \fI\-\-pdf\fP option, the converted image is written to
standard output. This should be redirected to a file, normally with
the \fI\&.jb2\fP extension. If stdout isn\(aqt redirected to a file (or a pipe),
the JBIG2 data will be written to the terminal, which may get confused.
.sp
There is no way to have \fBjbig2\fP read an image file on standard input. This
is by design, as it needs to seek within the file.
.sp
All options must appear before the filename. With the generic encoder
(no \fI\-s\fP option), anything after the filename is silently ignored. The
symbol encoder (\fI\-s\fP) can handle multiple images (which end up as pages
in the JBIG2 file).
.sp
The \fI\-r\fP, \fI\-\-refine\fP option mentioned in the documentation and in
the \fI\-\-help\fP output of \fBjbig2\fP is \fIdisabled\fP in this version of
\fBjbig2\fP\&.
.SH OPTIONS
.\" some of these are from the HTML file, some from --help.
.
.INDENT 0.0
.TP
.B \-b \fIbasename\fP
Output file root name when using symbol coding in PDF mode (\fI\-s\fP
and \fI\-p\fP). Default is \fBoutput\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-d\fP,\fB \-\-duplicate\-line\-removal
When encoding generic regions each scan line can be tagged to indicate
that it\(aqs the same as the last scanline \- and encoding that scanline
is skipped. This drastically reduces the encoding time (by a factor
of about 2 on some images) although it doesn\(aqt typically save any
bytes. This is an option because some versions of jbig2dec (an open
source decoding library) cannot handle this.
.TP
.B \-p\fP,\fB \-\-pdf
The PDF spec includes support for JBIG2 (Syntax\->Filters\->JBIG2Decode in
the PDF references for versions 1.4 and above). However, PDF requires
a slightly different format for JBIG2 streams: no file/page headers or
trailers and all pages are numbered 1. In symbol mode the output is to
a series of files: symboltable and page\-n (numbered from 0). By default
these are named \fBoutput.sym\fP and \fBoutput.0000\fP, \fBoutput.0001\fP,
etc. Use \fI\-b\fP to change the base filename.
.TP
.B \-s\fP,\fB \-\-symbol\-mode
Use symbol encoding. Turn on for scanned text pages.
.UNINDENT
.INDENT 0.0
.TP
.B \-t \fIthreshold\fP
Sets the fraction of pixels which have to match in order for
two symbols to be classed the same. This isn\(aqt strictly true, as there are
other tests as well, but increasing this will generally increase the number
of symbol classes. Default is 0.85.
.TP
.B \-T \fIthreshold\fP
Sets the black threshold (0\-255). Any gray value darker than
this is considered black. Anything lighter is considered white.
Default is 188.
.TP
.B \-O \fIoutfile\fP
Dump a PNG of the 1 bpp image before encoding. Can be used to
test loss.
.UNINDENT
.INDENT 0.0
.TP
.B \-2\fP,\fB \-4
Upscale either two or four times before converting to black and
white.
.TP
.B \-S
Segment an image into text and non\-text regions. This isn\(aqt perfect, but
running text through the symbol compressor is terrible so it\(aqs worth doing
if your input has images in it (like a magazine page).
.TP
.B \-\-image\-output
Set filename to which the parts which were removed by \-S are written.
Default is PNG format.
.TP
.B \-j\fP,\fB \-\-jpeg\-output
Write images from \-S as JPEG instead of PNG.
.TP
.B \-a\fP,\fB \-\-auto\-thresh
Use automatic thresholding in symbol encoder.
.TP
.B \-\-no\-hash
Disables use of hash function for automatic thresholding.
.TP
.B \-v
Be verbose.
.TP
.B \-V\fP,\fB \-\-version
Display version number and exit.
.TP
.B \-h\fP,\fB \-\-help
Display help and exit.
.UNINDENT
.SH EXIT STATUS
.sp
\fBjbig2\fP exits with 0 (success) status if the conversion completed
OK, and non\-zero status if anything went wrong. If standard output was
redirected to a file, the file will be empty or invalid when non\-zero
status is returned. Diagnostic messages are printed to standard error.
.SH COPYRIGHT
.sp
See the file /usr/doc/jbig2enc\-0.28/COPYING for license information.
.sp
This software is a description of processes which may be patented.
.sp
Use of this software may require patent licenses in some countries.
You are directed to annex I of the JBIG2 specification for information.
.INDENT 0.0
.TP
.B Some information could be found at:
\fI\%http://www.jpeg.org/jbig/index.html\fP
\fI\%http://www.cl.cam.ac.uk/~mgk25/jbigkit/patents/\fP
\fI\%http://www.jpeg.org/public/fcd14492.pdf\fP
\fI\%http://itscj.ipsj.or.jp/sc29/open/29view/29n55161.doc\fP
.UNINDENT
.SH AUTHORS
.INDENT 0.0
.TP
.B jbig2 and jbig2enc were written by:
Adam Langley <\fI\%agl@imperialviolet.org\fP>.
.UNINDENT
.sp
This man page written for the SlackBuilds.org project
by B. Watson, and is licensed under the WTFPL.
.SH SEE ALSO
.sp
\fBpdf.py(1)\fP, \fBjbig2dec(1)\fP
.INDENT 0.0
.TP
.B Full documentation for jbig2 and jbig2enc:
/usr/doc/jbig2enc\-0.28/jbig2enc.html
.TP
.B The JBIG2 specification was formerly located at:
\fI\%http://www.jpeg.org/public/fcd14492.pdf\fP
.TP
.B A copy can be found here:
\fI\%http://www.hlevkin.com/Standards/fcd14492.pdf\fP
.UNINDENT
.\" Generated by docutils manpage writer.
.