RESAMPLE(1)                                           RESAMPLE(1)

     NAME
          resample, resize - resample a picture

     SYNOPSIS
          resample [ -x size ] [ -y size ] [ file ]
          resize [ -n ] [ -x size ] [ -y size ] [ file ]

     DESCRIPTION
          Resample and Resize resamples its input image (default stan-
          dard input) to a new size.  Resample uses a Kaiser window
          which produces high quality results and resize uses bilinear
          interpolation which is faster but produces more fuzzy
          images.  By specifying the -n option, resize can also use
          nearest neighbour interpolation which preserves the indivi-
          dual pixels and is appropriate for pixel art or qr(1) out-
          put.

          The size of the resampled image can be specified with the -x
          and -y options.  An unadorned value sets the number of pix-
          els of that dimension; a suffixed percent sign specifies a
          percentage.  If only one of -x or -y is given, the other
          dimension is scaled to preserve the aspect ratio of the ori-
          ginal image.  Thus, -x50% will reduce the image to half its
          original dimension in both x and y.

          The input should be a Plan 9 image as described in image(6),
          and the output will be a 24-bit r8g8b8 image.  To change the
          pixel format, use iconv (see crop(1)).

     SOURCE
          /sys/src/cmd/resample.c
          /sys/src/cmd/resize.c

     SEE ALSO
          crop(1), image(6)



/plan9/man/1/