Penguin
Annotated edit history of pnmcrop(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 pnmcrop
2 !!!pnmcrop
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 SEE ALSO
8 AUTHOR
9 ----
10 !!NAME
11
12
13 pnmcrop - crop a portable anymap
14 !!SYNOPSIS
15
16
17 __pnmcrop__ [[__-white__|__-black__|__-sides__]
18 [[__-left__] [[__-right__] [[__-top__]
19 [[__-bottom__] [[''pnmfile'']
20
21
22 All options may be abbreviated to their shortest unique
23 prefix or specified with double hyphens.
24 !!DESCRIPTION
25
26
27 Reads a PBM, PGM, or PPM image as input. Removes borders
28 that are the background color, and produces the same type of
29 image as output.
30
31
32 If you don't specify otherwise, __pnmcrop__ assumes the
33 background color is whatever color the top left and right
34 corners of the image are and if they are different colors,
35 something midway between them. You can specify that the
36 background is white or black with the __-white__ and
37 __-black__ options or make __pnmcrop__ base its guess
38 on all four corners instead of just two with
39 __-sides__.
40
41
42 By default, __pnmcrop__ chops off any stripe of
43 background color it finds, on all four sides. You can tell
44 __pnmcrop__ to remove only specific borders with the
45 __-left__, __-right__, __-top__, and __-bottom__
46 options.
47
48
49 If you want to chop a specific amount off the side of an
50 image, use __pnmcut__.
51
52
53 If you want to add different borders after removing the
54 existing ones, use __pnmcat__ or
55 __pnmcomp__.
56 !!OPTIONS
57
58
59 __-white__
60
61
62 Take white to be the background color. __pnmcrop__
63 removes borders which are white.
64
65
66 __-black__
67
68
69 Take black to be the background color. __pnmcrop__
70 removes borders which are black.
71
72
73 __-sides__
74
75
76 Determine the background color from the colors of the four
77 corners of the input image. __pnmcrop__ removes borders
78 which are of the background color.
79
80
81 If at least three of the four corners are the same color,
82 __pnmcrop__ takes that as the background color. If not,
83 __pnmcrop__ looks for two corners of the same color in
84 the following order, taking the first found as the
85 background color: top, left, right, bottom. If all four
86 corners are different colors, __pnmcrop__ assumes an
87 average of the four colors as the background
88 color.
89
90
91 The __-sides__ option slows __pnmcrop__ down, as it
92 reads the entire image to determine the background color in
93 addition to the up to three times that it would read it
94 without __-sides__.
95
96
97 __-left__
98
99
100 Remove any left border.
101
102
103 __-right__
104
105
106 Remove any right border.
107
108
109 __-top__
110
111
112 Remove any top border.
113
114
115 __-bottom__
116
117
118 Remove any bottom border.
119
120
121 __-verbose__
122
123
124 Print on Standard Error information about the processing,
125 including exactly how much is being cropped off of which
126 sides.
127 !!SEE ALSO
128
129
130 pnmcut(1), pnmfile(1),
131 pnm(5)
132 !!AUTHOR
133
134
135 Copyright (C) 1989 by Jef Poskanzer.
136 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.