Provided by: mgetty-fax_1.1.36-2.1_amd64
g32pbm - convert a Group 3 fax file into a portable bitmap
g32pbm [-reversebits] [-stretch] [g3file]
Reads a Group 3 fax file (raw or digifax) as input. If no filename is given, stdin is used. Produces a portable bitmap as output.
-r Tells g32pbm to interpret bits least-significant first, instead of the default most-significant first ("-reversebits"). Some fax modems do it one way and others do it the other way. If you get a whole bunch of "invalid code" messages (nearly one per line), try using this flag. -s Double each horizontal row of the fax file in the pbm file ("-stretch)". You can use this to adjust the aspect ratio of a "normal resolution" fax file to match that of a "fine resolution" fax file. This might not seem like it belongs here, but it's much faster than using pnmscale|pgmtopbm later. -s is activated automatically if the file is specified on the command line and its name starts with "fn..." (fax/normal). -l(aserjet) Instead of a portable bitmap (PBM), output HP laserjet files, suitable for direct printing on a HP laserjet or desjket. -d <dpi> Scale output to <dpi> dots per inch before printing. Normal FAX resolution is 204x196 dpi (fine mode), or 204x98 dpi (normal mode). In LaerJet mode, only the values 75, 150 and 300 are allowed for <dpi>. -t turn image by 90 degrees clockwise. Multiple -t commands increase angle, that is, -t -t will turn it upside down, and so on. -? Print a short command syntax.
The standard for Group 3 fax is defined in CCITT Recommendation T.4.
g32pbm could be smarter about the image width, at the moment, the maximum width is 1728 pixels, and the maximum height is 4300 lines. Everything bigger is just cut off. Only 'raw' pbm files are created. Scaling is too slow. Turning is too slow (and not yet fully implemented either).
g32pbm is Copyright (C) 1993 by Gert Doering, <email@example.com>. It is similar to the g3topbm program in Jef Poskanzers pbmplus package, but it's a complete re-write. No code is copied.