]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/resample
winwatch: l allows label changes
[plan9front.git] / sys / man / 1 / resample
1 .TH RESAMPLE 1
2 .SH NAME
3 resample, resize - 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 .br
16 .B resize
17 [
18 .B -x
19 .I size
20 ] [
21 .B -y
22 .I size
23 ] [
24 .I file
25 ]
26 .SH DESCRIPTION
27 .I Resample
28 and
29 .I Resize
30 resamples its input image (default standard input) to a new size.
31 .I Resample
32 uses a Kaiser window which produces high quality results and
33 .I resize
34 uses bilinear interpolation which is faster but produces more
35 fuzzy images.
36 .PP
37 The size of the resampled image can be specified
38 with the
39 .B -x
40 and
41 .B -y
42 options.
43 An unadorned value sets the number of pixels of that dimension; a
44 suffixed percent sign specifies a percentage.
45 If only one of
46 .B -x
47 or
48 .B -y
49 is given, the other dimension is scaled to preserve
50 the aspect ratio of the original image.
51 Thus,
52 .B -x50%
53 will reduce the image to half its original dimension in both
54 .B x
55 and
56 .BR y .
57 .PP
58 The input should be a Plan 9 image
59 as described in 
60 .IR image (6),
61 and the output will be a compressed 24-bit
62 .B r8g8b8
63 image.
64 To uncompress the image or change the pixel format, use
65 .I iconv
66 (see
67 .IR crop (1)).
68 .PP
69 .SH SOURCE
70 .B /sys/src/cmd/resample.c
71 .br
72 .B /sys/src/cmd/resize.c
73 .SH "SEE ALSO
74 .IR crop (1),
75 .IR image (6)