Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH RESAMPLE 1
2
.SH NAME
3
resample \- resample a picture
4
.SH SYNOPSIS
5
.B resample
6
[
7
.B -x
8
.I size
9
] [
10
.B -y
11
.I size
12
] [
13
.I file
14
]
15
.SH DESCRIPTION
16
.I Resample
17
resamples its input image (default standard input) to a new size.
18
The image is decimated or interpolated using
19
a Kaiser window.
20
.PP
21
The size of the resampled image can be specified
22
with the
23
.B -x
24
and
25
.B -y
26
options.
27
An unadorned value sets the number of pixels of that dimension; a suffixed percent sign specifies a percentage.
28
If only one of
29
.B -x
30
or
31
.B -y
32
is given, the other dimension is scaled to preserve
33
the aspect ratio of the original image.
34
Thus,
35
.B -x50%
36
will reduce the image to half its original dimension in both
37
.B x
38
and
39
.BR y .
40
.PP
41
The input should be a Plan 9 image
42
as described in 
43
.IR image (6),
44
and the output will be a compressed 24-bit
45
.B r8g8b8
46
image.
47
To uncompress the image or change the pixel format, use
48
.I iconv
49
(see
50
.IR crop (1)).
51
.PP
52
.SH SOURCE
53
.B /sys/src/cmd/resample.c
54
.SH "SEE ALSO
55
.IR crop (1),
56
.IR image (6)
57
.SH BUGS
58
Faster algorithms exist, but this implementation produces correct pictures.