im_resize: Resize image

View source: R/pictplot.R

im_resizeR Documentation

Resize image

Description

If either height or width is given, the other is determined to keep the aspect ratio of image.

Usage

im_resize(im, height, width, interpolation = 1)

Arguments

im

an image

height

image height

width

image width

interpolation

Interpolation method. Either 0 (nearest-neighbor), 1 (linear), or 2 (cubic).

Value

an image

Examples

dim(regatta)
dim(im_resize(regatta, height = 150))
dim(im_resize(regatta, width = 300))
dim(im_resize(regatta, height = 100, width = 100))

tsuda16k/pictplot documentation built on March 1, 2023, 8:44 p.m.