summary refs log tree commit diff
path: root/pammosaicknit.html
blob: 8d1dde728796e3318e9a62fe00bea9013d632139 (plain) (blame)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pammosaicknit User Manual</title></head>
<body>
<h1>pammosaicknit</h1>
Updated: 12 December 2010
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

pammosaicknit - validate a mosaic knitting pattern

<h2 id="synopsis">SYNOPSIS</h2>

<p><b>pammosaicknit</b> [<i>in_netpbmfile</i>]

<h2 id="description">DESCRIPTION</h2>

<p>This program is part of <a href="index.html">Netpbm</a>.

<p><b>pammosaicknit</b> helps the user create
<a href="http://en.wikipedia.org/wiki/Slip-stitch_knitting#Mosaic_knitting">mosaic
knitting patterns</a>. 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.

<p>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.

<p>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.

<p>If the output image contains no red pixels, then the input image
represents a valid mosaic knitting pattern.

<h2 id="options">OPTIONS</h2>

<p>There are no command line options defined specifically
for <b>pammosaicknit</b>, but it recognizes the options common to all
programs based on libnetpbm (See <a href="index.html#commonoptions">
Common Options</a>.)

<h2 id="arguments">ARGUMENTS</h2>

<p><b>pammosaicknit</b>'s only argument,
<i>in_netpbmfile</i>, is the name of an image file that represents a mosaic
knitting pattern. If you don't specify
<i>in_netpbmfile</i>, the program reads the image from Standard Input.


<h2 id="notes">NOTES</h2>

<p>If the input image is not a black-and-white image, <b>pammosaicknit</b>
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).

<h2 id="seealso">SEE ALSO</h2>

<ul>
<li><a href="pam.html">pam</a></li>
</ul>

<h2 id="history">HISTORY</h2>

<p>pammosaicknit was new in Netpbm 10.53 (December 2010).

<h2 id="author">AUTHOR</h2>

<p>Copyright (C) 2010 Scott Pakin,
<a href="mailto:scott+pbm@pakin.org.">scott+pbm@pakin.org.</a>


<h2 id="index">Table Of Contents</h2>

<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#arguments">ARGUMENTS</a>
<li><a href="#notes">NOTES</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#history">HISTORY</a>
<li><a href="#author">AUTHOR</a>
</ul>

</body>
</html>