Annotation of researchv10dc/man/adm/man1/bcp.1, revision 1.1.1.1

1.1       root        1: .TH BCP 1 
                      2: .CT 1 graphics
                      3: .SH NAME
                      4: bcp \(mi reformat black-and-white picture files
                      5: .SH SYNOPSIS
                      6: .B bcp
                      7: [
                      8: .I option ...
                      9: ]
                     10: [
                     11: .I file1
                     12: [
                     13: .I file2
                     14: ]
                     15: ]
                     16: .SH DESCRIPTION
                     17: .I Bcp
                     18: copies black-and-white (B&W) image
                     19: .I file1
                     20: to
                     21: .I file2,
                     22: optionally changing the file format and transforming the image.
                     23: If
                     24: .I file1
                     25: is a directory name,
                     26: then every leaf of its file tree is processed in turn; and, in this case,
                     27: if
                     28: .I file2
                     29: also is specified, it is made the root directory
                     30: of an isomorphic tree of output files.
                     31: If
                     32: .I file2
                     33: is not specified, all output is catenated to stdout.
                     34: .PP
                     35: .I Bcp
                     36: can copy among all the B&W
                     37: .IR picfile (5)
                     38: formats, and some others.
                     39: The default output format is 
                     40: .BR TYPE=ccitt-g4 .
                     41: Image transformations include trimming, translation, scaling, and rotation,
                     42: performed in that order (not in argument order).
                     43: .PP
                     44: Input files in
                     45: .IR picfile (5)
                     46: format must begin with an ASCII 
                     47: .BI TYPE= type
                     48: header line.
                     49: .I Types
                     50: supported both as input and output are:
                     51: .nr xx \w'\fLccitt-g4\ '
                     52: .TP \n(xxu
                     53: .B dump
                     54: One byte/pixel.
                     55: .B NCHAN=1
                     56: is required.
                     57: On input, the grey pixel values are thresholded
                     58: to B&W;
                     59: see option
                     60: .BR -T .
                     61: On output, black becomes 0 and white 255.
                     62: .TP
                     63: .B bitmap
                     64: One bit/pixel.
                     65: Essentially Sun rasterfile format, with a
                     66: .IR picfile (5)
                     67: header replacing the Sun binary header.
                     68: .TP
                     69: .B ccitt-g4
                     70: CCITT Group 4 FAX encoding, strongly compressive on printed text.
                     71: Also,
                     72: .B ccitt-g31
                     73: (Group 3, 1-dim)
                     74: and
                     75: .B ccitt-g32
                     76: (Group 3, 2-dim).
                     77: .LP
                     78: Other supported
                     79: .I types
                     80: are:
                     81: .TP \n(xxu
                     82: .B binary
                     83: One bit/pixel encoding; obsolescent, but needed for old image archives.
                     84: Both input and output.
                     85: .TP
                     86: .B rle
                     87: Fast run-length encoding; obsolescent, but needed for old image archives.
                     88: Input or output, but not both.
                     89: .TP
                     90: .B pico
                     91: Same as
                     92: .BR dump .
                     93: Input only.
                     94: .TP
                     95: .B cdf
                     96: `Compound document format', used in AT&T FAX Connection product.
                     97: Input only.
                     98: Only the first of multiple pages is read.
                     99: .LP
                    100: Other formats not using a 
                    101: .BI TYPE= type
                    102: header,
                    103: and thus supported only on output, are:
                    104: .IR bitfile (9.5)
                    105: format; 
                    106: PostScript bitmap format; and
                    107: Sun rasterfile format (with the Sun binary header).
                    108: .PP
                    109: The options are:
                    110: .TP \n(xxu
                    111: .B -B
                    112: Write
                    113: .IR bitfile (9.5)
                    114: format (no 
                    115: .BI TYPE= type
                    116: header).
                    117: .TP
                    118: .B -M
                    119: Write 
                    120: .B TYPE=bitmap
                    121: format.
                    122: .TP
                    123: .B -P
                    124: Write Postscript bitmap format.
                    125: .TP
                    126: .BI -R x , y
                    127: Force output resolutions to 
                    128: .I x,y
                    129: (pixels/inch).
                    130: If 
                    131: .BI , y
                    132: is missing, it is taken to be the same as
                    133: .I x.
                    134: Overrides
                    135: .BI -x x , y .
                    136: Requires a 
                    137: .BI RES= "x y
                    138: line in the header (but, see 
                    139: .BR -Z ).
                    140: .TP
                    141: .B -R=
                    142: Force the
                    143: .I x,y
                    144: resolutions to be equal to the greater of
                    145: .I x
                    146: and
                    147: .IR y .
                    148: .TP
                    149: .B -S
                    150: Write Sun rasterfile format (no 
                    151: .BI TYPE= type
                    152: header).
                    153: .TP
                    154: .BI -T t
                    155: Threshold.
                    156: When reading 
                    157: .BR TYPE=dump ,
                    158: assign black to grey levels less than
                    159: .I t,
                    160: and white to others.
                    161: Default:
                    162: .BR -T128 .
                    163: .TP
                    164: .BI -Z x , y
                    165: Supply missing input 
                    166: .BI RES= "x y
                    167: header line.
                    168: .TP
                    169: .B -b
                    170: Write 
                    171: .B TYPE=binary
                    172: format.
                    173: .TP
                    174: .B -g4
                    175: .br
                    176: .ns
                    177: .TP
                    178: .B -4
                    179: Write 
                    180: .B TYPE=ccitt-g4
                    181: format.
                    182: Similarly, 
                    183: .B -g31
                    184: or
                    185: .B -31
                    186: and 
                    187: .B -g32
                    188: or
                    189: .BR -32 .
                    190: .TP
                    191: .BI -k n
                    192: Set the `k' for 
                    193: .B ccitt-g32
                    194: encoding on output (default
                    195: .BR -k4 ).
                    196: .TP
                    197: .BI -o x , y
                    198: Offset (translate) the image by 
                    199: .I x,y
                    200: pixels.
                    201: The width and height of the picture are not changed.
                    202: .TP
                    203: .B -p
                    204: Write 
                    205: .B TYPE=dump NCHAN=1
                    206: format.
                    207: Map black to 0, white to 255.
                    208: .TP
                    209: .B -r
                    210: Write 
                    211: .B TYPE=rle
                    212: format.
                    213: .TP
                    214: .B -tl
                    215: Rotate the image to bring the left edge of the page to the top.
                    216: Set top-left corner of the rotated
                    217: image at the top-left corner of the image.
                    218: .TP
                    219: .BI -t d
                    220: Rotate the image 
                    221: .I d
                    222: degrees counterclockwise about its center.
                    223: .I d
                    224: is a real number.
                    225: .TP
                    226: .BI -w l , t , r , b
                    227: Specify window (trim the image):
                    228: .I l,t
                    229: is the left-top corner and 
                    230: .I r,b
                    231: the right-bottom corner measured in pixels.
                    232: If the new margins are outside the original picture,
                    233: the new area is set to white.
                    234: An argument given as
                    235: .L %
                    236: leaves the edge unchanged.
                    237: .TP
                    238: .BI -x x , y
                    239: Expand/contract (scale) the image, by real factors 
                    240: .I x
                    241: and
                    242: .I y.
                    243: If
                    244: .BI , y
                    245: is missing,
                    246: .I y
                    247: is taken to be the same as
                    248: .I x.
                    249: May be overridden by 
                    250: .BI -R x , y.
                    251: Requires a 
                    252: .BI RES= "x y
                    253: line in the header (but, see 
                    254: .BR -Z ).
                    255: .SH SEE ALSO
                    256: .IR cscan (1),
                    257: .IR imscan (1),
                    258: .IR ocr (1),
                    259: .IR pico (1),
                    260: .IR picfile (5)
                    261: .br
                    262: CCITT facsimile coding standards Rec. T.4(1988) and T.6(1988).
                    263: .SH BUGS
                    264: Only one page per input file is supported.
                    265: .br
                    266: Scaling is accomplished by naive replication/deletion of pixels.
                    267: .br
                    268: Rotation by small angles exhibits aliasing effects, and is slow.
                    269: .br
                    270: Rotations
                    271: .B -tr
                    272: and
                    273: .B -tb
                    274: are unfinished.
                    275: .br
                    276: CCITT FAX `uncompressed' (or, `transparent') mode is not implemented.
                    277: .br
                    278: Postscript output is useful only for small images.
                    279: .br
                    280: .BI WINDOW= "l t r b
                    281: where
                    282: .I l
                    283: or
                    284: .I t
                    285: is non-zero
                    286: may not be handled correctly for every combination of file types.
                    287: .br
                    288: .B TYPE=rle
                    289: can't be both input and output.
                    290: .br
                    291: Should be merged with T. Duff's
                    292: .I pcp.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.