58 lines · 1.1 KB · Text
RawDownload
.TH RESAMPLE 1.SH NAMEresample \- resample a picture.SH SYNOPSIS.B resample[.B -x.I size] [.B -y.I size] [.I file].SH DESCRIPTION.I Resampleresamples its input image (default standard input) to a new size.The image is decimated or interpolated usinga Kaiser window..PPThe size of the resampled image can be specifiedwith the.B -xand.B -yoptions.An unadorned value sets the number of pixels of that dimension; a suffixed percent sign specifies a percentage.If only one of.B -xor.B -yis given, the other dimension is scaled to preservethe aspect ratio of the original image.Thus,.B -x50%will reduce the image to half its original dimension in both.B xand.BR y ..PPThe input should be a Plan 9 imageas described in .IR image (6),and the output will be a compressed 24-bit.B r8g8b8image.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.SH "SEE ALSO.IR crop (1),.IR image (6).SH BUGSFaster algorithms exist, but this implementation produces correct pictures.