groff 1.23.0 added .MR to its -man macro package. The NEWS file states
that the inclusion of the macro "was prompted by its introduction to
Plan 9 from User Space's troff in August 2020." From d32deab it seems
that the name for Plan 9 from User Space's implementation was suggested
by groff maintainer G. Brandon Robinson.
Not sure if the intention was to make these definitions compatible, but
it would be nice if they were.
Currently, Plan 9 from User Space's .MR expects its second argument to
be parenthesized. groff's .MR does not. This results in extra
parentheses appearing in manual references when viewing Plan 9 from User
Space's manual pages on a system using groff.
59 lines
1.1 KiB
Groff
Executable File
59 lines
1.1 KiB
Groff
Executable File
.TH RESAMPLE 1
|
|
.SH NAME
|
|
resample \- resample a picture
|
|
.SH SYNOPSIS
|
|
.B resample
|
|
[
|
|
.B -x
|
|
.I size
|
|
] [
|
|
.B -y
|
|
.I size
|
|
] [
|
|
.I file
|
|
]
|
|
.SH DESCRIPTION
|
|
.I Resample
|
|
resamples its input image (default standard input) to a new size.
|
|
The image is decimated or interpolated using
|
|
a Kaiser window.
|
|
.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
|
|
.MR image 7 ,
|
|
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
|
|
.MR crop 1 ).
|
|
.PP
|
|
.SH SOURCE
|
|
.B \*9/src/cmd/resample.c
|
|
.SH "SEE ALSO
|
|
.MR crop 1 ,
|
|
.MR image 7
|
|
.SH BUGS
|
|
Faster algorithms exist, but this implementation produces correct pictures.
|