im_rotate: Rotate an image

View source: R/pictplot.R

im_rotateR Documentation

Rotate an image

Description

Rotate an image

Usage

im_rotate(
  im,
  angle,
  expand = FALSE,
  cx = NULL,
  cy = NULL,
  interpolation = 2,
  pad = "zero"
)

Arguments

im

an image

angle

rotation angle in degrees

expand

either FALSE (default, does not change image size) or TRUE

cx

center of rotation along x

cy

center of rotation along y

interpolation

Type of interpolation. Either 0 (nearest), 1 (linear), or 2 (cubic).

pad

Type of padding. Either "zero", "neumann", or "repeat".

Value

an image

Examples

plot(im_rotate(regatta, 30))
plot(im_rotate(regatta, 30, expand = TRUE))
plot(im_rotate(regatta, 30, expand = TRUE, pad = "repeat"))

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