Debian Codegraph @

upstream/debian-unstable/man1/ppmcolormask.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Ppmcolormask User Manual" 1 "01 May 2006" "netpbm documentation"
7
8 .SH NAME
9 ppmcolormask - produce mask of areas of a certain color in a PPM file
10
11 .UN synopsis
12 .SH SYNOPSIS
13
14 \fBppmcolormask\fP \fB-color=\fP\fIcolor_list\fP [\fIppmfile\fP]
15 .PP
16 \fBppmcolormask\fP \fIcolor\fP [\fIppmfile\fP]
17
18 .UN examples
19 .SH EXAMPLES
20
21 .nf
22 \f(CW
23 ppmcolormask -color red testimg.ppm >redmask.pbm
24 pamcomp background.ppm testimg.ppm -alpha=redmask.pbm >test.ppm
25
26 ppmcolormask -color=red,pink,salmon testimg.ppm >reddishmask.pbm
27
28 ppmcolormask -color=bk:red,bk:orange,bk:yellow testimg.ppm >firemask.pbm
29
30 \fP
31
32 .fi
33
34 .UN description
35 .SH DESCRIPTION
36 .PP
37 This program is part of
38 .BR "Netpbm" (1)\c
39 \&.
40 .PP
41 \fBppmcolormask\fP reads a PPM file as input and produces a PBM
42 (bitmap) file as output. The output file is the same dimensions as
43 the input file and is black in all places where the input file is a
44 color indicated by the \fB-color\fP option, and white everywhere
45 else.
46 .PP
47 The output of \fBppmcolormask\fP is useful as a transparency mask input
48 to \fBpamcomp\fP. Note that you don't need \fBppmcolormask\fP and
49 \fBpamcomp\fP if you are ultimately converting to PNG with
50 \fBpnmtopng\fP because the \fB-transparent\fP option on \fBpnmtopng\fP does
51 the same thing.
52 .PP
53 \fIppmfile\fP is the input file. If you don't specify
54 \fIppmfile\fP, the input is from Standard Input.
55 .PP
56 The output goes to Standard Output.
57 .PP
58 In the obsolete alternative syntax, specifying the \fIcolor\fP
59 names a single exact color to be masked.
60 .PP
61 \fBppmchange\fP does a similar thing: it modifies an image by
62 changing colors you specify to other colors you specify. The two
63 programs give you somewhat different means of specifying colors in the
64 input image.
65 .PP
66 To make a mask of an image's background, without having to tell it
67 what color it is, use \fBpambackground\fP.
68
69 .UN options
70 .SH OPTIONS
71 .PP
72 In addition to the options common to all programs based on libnetpbm
73 (most notably \fB-quiet\fP, see
74 .UR index.html#commonoptions
75 Common Options
76 .UE
77 \&), \fBppmcolormask\fP recognizes the following
78 command line option:
79
80
81 .TP
82 \fB-color=\fP\fIcolor_list\fP
83 This mandatory option specifies the colors that are to be masked
84 (where the image is one of these colors, the output mask will be black).
85 .sp
86 Examples:
87
88
89 .IP \(bu
90 \fB-color=red\fP
91 .IP \(bu
92 \fB-color=red,pink,salmon\fP
93 .IP \(bu
94 \fB-color=rgb:80/80/ff\fP
95 .IP \(bu
96 \fB-color=bk:red,bk:orange,bk:yellow\fP
97
98 .sp
99 \fIcolor_list\fP is a list of colors separated by commas. Each
100 color is either an exact color name as described for the
101 .UR libnetpbm_image.html#colorname
102 argument of the \fBpnm_parsecolor()\fP library routine
103 .UE
104 \& or one of the
105 .UR libppm.html#berlinkay
106 Berlin-Kay color names
107 .UE
108 \&. In the
109 latter case, all colors that are better described by that Berlin-Kay
110 color name than any other are in the mask set.
111 .sp
112 The algorithm \fBppmcolormask\fP uses to determine to which colors
113 a Berlin-Kay color name applies is based on a Sugeno-type fuzzy
114 inference system developed by \fIKenan Kalajdzic\fP in 2006. The
115 fuzzy model consists of partially linear membership functions defined
116 in the HSV color space. Although more complex algorithms for fuzzy
117 color matching exist, this algorithm is intentionally simplified to
118 achieve a satisfactory speed using relatively compact code.
119 .sp
120 This option was new in Netpbm 10.34 (June 2006). Before that,
121 you must use the \fIcolor\fP argument and cannot specify a Berlin-Kay
122 color.
123
124
125
126 .UN seealso
127 .SH SEE ALSO
128 .BR "pamfind" (1)\c
129 \&,
130 .BR "pambackground" (1)\c
131 \&,
132 .BR "ppmchange" (1)\c
133 \&,
134 .BR "pgmtoppm" (1)\c
135 \&,
136 .BR "pamcomp" (1)\c
137 \&,
138 .BR "pbmmask" (1)\c
139 \&,
140 .BR "pnmtopng" (1)\c
141 \&,
142 .BR "ppm" (1)\c
143 \&
144 .SH DOCUMENT SOURCE
145 This manual page was generated by the Netpbm tool 'makeman' from HTML
146 source. The master documentation is at
147 .IP
148 .B http://netpbm.sourceforge.net/doc/ppmcolormask.html
149 .PP