1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it! If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Pammosaicknit User Manual" 0 "12 December 2010" "netpbm documentation"
.SH NAME
pammosaicknit - validate a mosaic knitting pattern
.UN synopsis
.SH SYNOPSIS
.PP
\fBpammosaicknit\fP [\fIin_netpbmfile\fP]
.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpammosaicknit\fP helps the user create
.UR http://en.wikipedia.org/wiki/Slip-stitch_knitting#Mosaic_knitting
mosaic knitting patterns
.UE
\&. The program inputs a black-and-white Netpbm image that
describes a mosaic knitting pattern and outputs a color Netpbm image of the
same pattern but with invalid runs shown in red.
.PP
A valid knitting pattern starts with a "black" row on the
bottom and alternates "white" and "black"
rows. A "black" row can contain any arrangement of black pixels
but no more than three consecutive white pixels. A "white" row
can contain any arrangement of white pixels but no more than three
consecutive black pixels. Columns wrap horizontally, so a "white"
row that both begins and ends with two black pixels is deemed to
contain four consecutive black pixels. Because this is an invalid
number for a "white" row, those four pixels will be recolored red
in the output image.
.PP
For clarity, there are two shades of red in the output image. Dark
red pixels indicate pixels that were black in the input image but
which must contain one or more white pixels. Light red pixels indicate
pixels that were white in the input image but which must contain one
or more black pixels.
.PP
If the output image contains no red pixels, then the input image
represents a valid mosaic knitting pattern.
.UN options
.SH OPTIONS
.PP
There are no command line options defined specifically
for \fBpammosaicknit\fP, but it recognizes the options common to all
programs based on libnetpbm (See
.UR index.html#commonoptions
Common Options
.UE
\&.)
.UN arguments
.SH ARGUMENTS
.PP
\fBpammosaicknit\fP's only argument,
\fIin_netpbmfile\fP, is the name of an image file that represents a mosaic
knitting pattern. If you don't specify
\fIin_netpbmfile\fP, the program reads the image from Standard Input.
.UN notes
.SH NOTES
.PP
If the input image is not a black-and-white image, \fBpammosaicknit\fP
converts it internally to black and white by thresholding each pixel's
luminosity. The output image is always a color image containing at most four
colors (black, white, dark red, light red).
.UN seealso
.SH SEE ALSO
.IP \(bu
.BR "pam" (5)\c
\&
.UN history
.SH HISTORY
.PP
pammosaicknit was new in Netpbm 10.53 (December 2010).
.UN author
.SH AUTHOR
.PP
Copyright (C) 2010 Scott Pakin,
\fIscott+pbm@pakin.org\fP
.UN index
.SH Table Of Contents
.IP \(bu
.UR #synopsis
SYNOPSIS
.UE
\&
.IP \(bu
.UR #description
DESCRIPTION
.UE
\&
.IP \(bu
.UR #options
OPTIONS
.UE
\&
.IP \(bu
.UR #arguments
ARGUMENTS
.UE
\&
.IP \(bu
.UR #notes
NOTES
.UE
\&
.IP \(bu
.UR #seealso
SEE ALSO
.UE
\&
.IP \(bu
.UR #history
HISTORY
.UE
\&
.IP \(bu
.UR #author
AUTHOR
.UE
\&
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source. The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/pammosaicknit.html
.PP
|