summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man1/pamstretch.1
blob: 379b89b6cf65ac0ce7d048d91fa51c8a6341d02f (plain)
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
\
.\" 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 "Pamstretch User Manual" 0 "02 February 2019" "netpbm documentation"

.SH NAME
pamstretch - scale up a PNM or PAM image by interpolating between pixels.

.UN synopsis
.SH SYNOPSIS

\fBpamstretch\fP

[\fB-xscale=\fP\fIX\fP]

[\fB-yscale=\fP\fIY\fP]
[\fB-blackedge\fP]

[\fB-dropedge\fP]

\fIN\fP

[\fIinfile\fP]
.PP
You can use the minimum unique abbreviation of the options.  You can use
two hyphens instead of one.  You can separate an option name from its value
with white space instead of an equals sign.

.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBpamstretch \fP scales up pictures by integer values, either
vertically, horizontally, or both.  \fBpamstretch \fP differs from
\fBpamscale\fP and \fBpamenlarge\fP in that when it inserts the
additional rows and columns, instead of making the new row or column a
copy of its neighbor, \fBpamstretch\fP makes the new row or column an
interpolation between its neighbors.  In some images, this produces
better looking output.
.PP
To scale up to non-integer pixel sizes, e.g. 2.5, try
.BR "pamstretch-gen" (1)\c
\& instead.
.PP
Options let you select alternative methods of dealing with the
right/bottom edges of the picture.  Since the interpolation is done
between the top-left corners of the scaled-up pixels, it's not obvious
what to do with the right/bottom edges.  The default behaviour is to
scale those up without interpolation (more precisely, the right edge
is only interpolated vertically, and the bottom edge is only
interpolated horizontally), but there are two other possibilities,
selected by the \fB-blackedge\fP and \fB-dropedge\fP options.
.PP
In the special case that the stretch factor is 1, there is no issue with
the right and bottom edges, the edges of the output are identical to the edges
of the input regardless of \fB-blackedge\fP and \fB-dropedge\fP.  However,
before Netpbm 10.86 (March 2019), \fB-dropedge\fP would cause the edge to be
dropped even where the stretch factor was 1.
  
  
.UN parameters
.SH PARAMETERS
.PP
The \fIN\fP parameter is the scale factor.  It is valid only if
you \fIdon't\fP specify \fB-xscale\fP or \fB-yscale\fP.  In that
case, \fBpamstretch\fP scales in both dimensions and by the scale
factor \fIN\fP.
.PP
Before Netpbm 10.86 (March 2019), 1 was not a valid value.
  

.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see 
.UR index.html#commonoptions
 Common Options
.UE
\&), \fBpamstretch\fP recognizes the following
command line options:


.TP
\fB-xscale=\fP\fIX\fP
This is the horizontal scale factor.  If you don't specify this, but do
specify a vertical scale factor, the horizontal scale factor is 1.
.sp
This option was new in Netpbm 9.21 (December 2001).
  
.TP
\fB-yscale=\fP\fIY\fP
This is the vertical scale factor.  If you don't specify this, but
do specify a horizontal scale factor, the vertical scale factor is 1.
.sp
This option was new in Netpbm 9.21 (December 2001).

.TP
\fB-blackedge\fP
interpolate to black at right/bottom edges.

.TP
\fB-dropedge\fP
drop one (source) pixel at right/bottom edges. This is arguably
more logical than the default behaviour, but it means producing output
which is a slightly odd size.



.UN limitations
.SH LIMITATIONS
.PP
Usually produces fairly ugly output for PBMs. For most PBM input
you'll probably want to reduce the `noise' first using something like
.BR "pnmnlfilt" (1)\c
\&.

.UN seealso
.SH SEE ALSO
.BR "pamstretch-gen" (1)\c
\&,
.BR "pamenlarge" (1)\c
\&,
.BR "pamscale" (1)\c
\&,
.BR "pnmnlfilt" (1)\c
\&

.UN author
.SH AUTHOR
.PP
Russell Marks (\fIrussell.marks@ntlworld.com\fP).
.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/pamstretch.html
.PP