1Pnmtojbig User Manual(0)                              Pnmtojbig User Manual(0)
2
3
4

NAME

6       pnmtojbig - PNM to JBIG file converter
7
8

SYNOPSIS

10       pnmtojbig
11
12       [options] [input-file [output-file]]
13
14

DESCRIPTION

16       This program is part of Netpbm(1).
17
18       pnmtojbig  reads  a  PBM  or  PGM image, compresses it, and outputs the
19       image as a JBIG bi-level image entity (BIE) file.
20
21       JBIG is a highly effective lossless compression algorithm for  bi-level
22       images  (one bit per pixel), which is particularly suitable for scanned
23       document pages.
24
25       A JBIG encoded image can be stored in several resolutions  (progressive
26       mode).   These resolution layers can be stored all in one single BIE or
27       they can be stored in several separate BIE files.  All resolution  lay‐
28       ers  except the lowest one are stored merely as differences to the next
29       lower resolution layer, because this requires less space than  encoding
30       the  full  image completely every time. Each resolution layer has twice
31       the number of horizontal and vertical pixels than the next lower layer.
32       JBIG  files  can  also  store several bits per pixel as separate bitmap
33       planes, and pnmtojbig can read a PGM  file  and  transform  it  into  a
34       multi-bitplane BIE.
35
36

OPTIONS

38       -q     Encode  the  image  in  one  single resolution layer (sequential
39              mode). This is usually the most efficient compression method. By
40              default, the number of resolution layers is chosen automatically
41              such that the lowest layer image is not larger than  640  ×  480
42              pixels.
43
44
45       -x number
46              Specify  the  maximal  horizontal  size of the lowest resolution
47              layer.  The default is 640 pixels.
48
49
50       -y number
51              Specify the maximal  vertical  size  of  the  lowest  resolution
52              layer.  The default is 480 pixels.
53
54
55       -l number
56              Select  the  lowest resolution layer that will be written to the
57              BIE.  It is possible to store the various resolution layers of a
58              JBIG  image in progressive mode into different BIEs.  Options -l
59              and -h allow you to select the  resolution-layer  interval  that
60              will appear in the created BIE.  The lowest resolution layer has
61              number 0 and this is also the default value.  By default, pnmto‐
62              jbig writes all layers.
63
64
65       -h number
66              Select  the highest resolution layer that will be written to the
67              BIE.  By default, pnmtojbig writes all layers.  See also  option
68              -l.
69
70
71       -b     Use  binary values instead of Gray code words in order to encode
72              pixel values in multiple bitplanes.  This  option  has  only  an
73              effect  if the input is a PGM file and if more than one bitplane
74              is produced. Note that the decoder has to make the  same  selec‐
75              tion  but  cannot determine from the BIE, whether Gray or binary
76              code words were used by the encoder.
77
78
79       -d number
80              Specify the total number of differential resolution layers  into
81              which  the  input  image will be split in addition to the lowest
82              layer.  Each additional layer reduces the size of layer 0 by  50
83              %.  This option overrides options -x and -y, which are usually a
84              more comfortable way of selecting the number of resolution  lay‐
85              ers.
86
87
88       -s number
89              The JBIG algorithm splits each image into a number of horizontal
90              stripes.  This option specifies that each stripe shall have num‐
91              ber  lines  in  layer  0.  The default value is selected so that
92              approximately 35 stripes will be used for the whole image.
93
94
95       -m number
96              Select the maximum horizontal offset of  the  adaptive  template
97              pixel.   The  JBIG  encoder uses a number of neighbour pixels in
98              order to get statistical a priori knowledge of the  probability,
99              whether the next pixel will be black or white.  One single pixel
100              out of this template of context neighbor  pixels  can  be  moved
101              around.   Especially for dithered images it can be a significant
102              advantage to have one neighbor pixel which has a distance  large
103              enough  to  cover  the period of a dither function.  By default,
104              the adaptive template pixel can be moved up to  8  pixels  away.
105              This  encoder  supports up to 23 pixels, however as decoders are
106              only required to support at least a distance of 16 pixels by the
107              standard,  no  higher value than 16 for number is recommended in
108              order to maintain interoperability with other  JBIG  implementa‐
109              tions.   The  maximal  vertical  offset of the adaptive template
110              pixel is always zero.
111
112
113       -t number
114              Encode only the specified number of most significant bit planes.
115              This  option  allows to reduce the depth of an input PGM file if
116              not all bits per pixel are needed in the output.
117
118
119       -o number
120              JBIG separates an image into several horizontal stripes, resolu‐
121              tion  layers  and  planes,  were each plane contains one bit per
122              pixel.  One single stripe in one plane and layer is encoded as a
123              data unit called stripe data entity (SDE) inside the BIE.  There
124              are 12 different possible orders in which the SDEs can be stored
125              inside  the BIE and number selects which one shall be used.  The
126              order of the SDEs is only relevant for applications that want to
127              decode  a  JBIG  file  which has not yet completely arrived from
128              e.g. a slow network connection.  For instance some  applications
129              prefer  that  the outermost of the three loops (stripes, layers,
130              planes) is over all layers so that all data of the lowest  reso‐
131              lution layer is transmitted first.
132
133              The  following  values for number select these loop arrangements
134              for writing the SDEs (outermost loop first):
135
136
137
138       0      planes, layers, stripes
139
140
141       2      layers, planes, stripes
142
143
144       3      layers, stripes, planes
145
146
147       4      stripes, planes, layers
148
149
150       5      planes, stripes, layers
151
152
153       6      stripes, layers, planes
154
155
156
157              All loops count starting with zero, however by adding 8  to  the
158              above  order  code,  the  layer  loop can be reversed so that it
159              counts down to zero and then higher resolution  layers  will  be
160              stored  before lower layers.  Default order is 3 which writes at
161              first all planes of the first stripe and then completes layer  0
162              before continuing with the next layer and so on.
163
164
165       -p number
166              This  option  allows  you  to  activate  or  deactivate  various
167              optional algorithms defined in the JBIG standard.  Just add  the
168              numbers  of  the following options which you want to activate in
169              order to get the number value:
170
171
172
173
174       4      deterministic prediction (DPON)
175
176
177       8      typical prediction (TPBON)
178
179
180       16     diff. layer typical prediction (TPDON)
181
182
183       64     layer 0 two-line template (LRLTWO)
184
185
186
187              Except for special applications (like  communication  with  JBIG
188              subset implementations) and for debugging purposes you will nor‐
189              mally not want to change anything  here.   The  default  is  28,
190              which provides the best compression result.
191
192
193       -c     The  adaptive template pixel movement is determined as suggested
194              in annex C of the standard.   By  default  the  template  change
195              takes  place  directly in the next line which is most effective.
196              However a few conformance test examples in the standard  require
197              the  adaptive template change to be delayed until the first line
198              of the next stripe.  This option selects this special  behavior,
199              which is normally not required except in order to pass some con‐
200              formance test suite.
201
202
203       -v     After pnmtojbig creates  the  BIE,  it  lists  a  few  technical
204              details of the created file (verbose mode).
205
206
207
208

FORMATS

210       Most of the format pnmtojbig creates is defined by the JBIG standard.
211
212       The  standard,  however,  does not specify which values in the BIE mean
213       white and which mean black.  It contains a recommendation  that  for  a
214       single  plane  image  zero mean background and one mean foreground, but
215       the Netpbm formats have no concept of foreground and  background.   And
216       the standard says nothing about values for multiple plane BIEs.
217
218       pnmtojbig  follows  Markus Kuhn's implementation of the standard in the
219       pbmtojbg program that comes with his JBIG library:  If  the  BIE  is  a
220       single  plane  BIE,  zero  means white and one means black.  If it is a
221       multiple plane BIE, zero means black and the maximal value is white.
222
223

STANDARDS

225       This program implements the JBIG image coding algorithm as specified in
226       ISO/IEC 11544:1993 and ITU-T T.82(1993).
227
228

AUTHOR

230       pnmtojbig  is  based  on  the  JBIG library by Markus Kuhn, part of his
231       JBIG-KIT package.  The pbmtojbg program is part of the  JBIG-KIT  pack‐
232       age.   The  most recent version of that library and tools set is freely
233       available on the Internet from anonymous ftp server ftp.informatik.uni-
234       erlangen.de   ⟨ftp://ftp.informatik.uni-erlangen.de⟩      in  directory
235       pub/doc/ISO/JBIG/.
236
237       pnmtojbig is part of the Netpbm package of graphics tools.
238
239

SEE ALSO

241       pnm(1), jbigtopnm(1)
242
243

LICENSE

245       If you use pnmtojbig, you are using various  patents,  particularly  on
246       its  arithmetic encoding method, and in all probability you do not have
247       a license from the patent owners to do so.
248

DOCUMENT SOURCE

250       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
251       source.  The master documentation is at
252
253              http://netpbm.sourceforge.net/doc/pnmtojbig.html
254
255netpbm documentation              20 May 2000         Pnmtojbig User Manual(0)
Impressum