summary refs log tree commit diff
path: root/ppmshift.html
blob: ce825e04392e51c21a79716849cb3a65695c4bd1 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Ppmshift User Manual</title></head>
<body>
<h1>ppmshift</h1>
Updated: 20 November 2008
<br>
<a href="#index">Table Of Contents</a>

<h2>NAME</h2>

ppmshift - shift lines of a PPM image left or right by a random amount

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

<b>ppmshift</b>
<i>shift</i>
[<i>ppmfile</i>]

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

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

<p><b>ppmshift</b> reads a PPM image as input.  It shifts every row of image
data to the left or right by a random amount, within a range of <i>shift</i>
pixels.  The random distribution is uniform, centered at zero movement.

<p>The randomness in the image is limited before Netpbm 10.37 (December
2006) -- if you run the program twice in the same second, you may get
identical output.

<p>This is an effect the author intended to use for MPEG tests.
Unfortunately, this program is not useful for that - it creates too random
patterns to be used for animations.  Still, it might give interesting results
on still images.

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

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

<h2 id="example">EXAMPLE</h2>

<p>Check this out: Save your favorite model's picture from something like
alt.binaries.pictures.supermodels (ok, or from any other picture source),
convert it to ppm, and process it e.g. like this, assuming the picture is 
800x600 pixels:

<pre>
     #take the upper half, and leave it like it is
     pamcut -top=0 -width=800 -height=300 cs.ppm &gt;upper.ppm
     
     #take the lower half, flip it upside down, dim it and distort it a little
     pamcut -top=300 -width=800 -height=300 cs.ppm | \
         pamflip -topbottom | \
         ppmdim 0.7 | \
         ppmshift 10 &gt;lower.ppm
     
     #and concatenate the two pieces
     pamcat -topbottom upper.ppm lower.ppm &gt;newpic.ppm

</pre>

<p>The resulting picture looks like the image being reflected on a water 
surface with slight ripples.

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

<a href="ppm.html">ppm</a>,
<a href="pamcut.html">pamcut</a>,
<a href="pamflip.html">pamflip</a>,
<a href="ppmdim.html">ppmdim</a>,
<a href="pamcat.html">pamcat</a>


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

Copyright (C) 1993 by Frank Neumann

<hr>
<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="#example">EXAMPLE</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
</ul>
</body>
</html>