shithub: riscv

ref: 2fb18c3339cf8255d39bb41d495a79c9fca21ddd
dir: /sys/man/1/resample/

View raw version
.TH RESAMPLE 1
.SH NAME
resample, resize - resample a picture
.SH SYNOPSIS
.B resample
[
.B -x
.I size
] [
.B -y
.I size
] [
.I file
]
.br
.B resize
[
.B -x
.I size
] [
.B -y
.I size
] [
.I file
]
.SH DESCRIPTION
.I Resample
and
.I Resize
resamples its input image (default standard input) to a new size.
.I Resample
uses a Kaiser window which produces high quality results and
.I resize
uses bilinear interpolation which is faster but produces more
fuzzy images.
.PP
The size of the resampled image can be specified
with the
.B -x
and
.B -y
options.
An unadorned value sets the number of pixels of that dimension; a
suffixed percent sign specifies a percentage.
If only one of
.B -x
or
.B -y
is given, the other dimension is scaled to preserve
the aspect ratio of the original image.
Thus,
.B -x50%
will reduce the image to half its original dimension in both
.B x
and
.BR y .
.PP
The input should be a Plan 9 image
as described in 
.IR image (6),
and the output will be a compressed 24-bit
.B r8g8b8
image.
To uncompress the image or change the pixel format, use
.I iconv
(see
.IR crop (1)).
.PP
.SH SOURCE
.B /sys/src/cmd/resample.c
.br
.B /sys/src/cmd/resize.c
.SH "SEE ALSO
.IR crop (1),
.IR image (6)