interactive_crop: interactive cropping

View source: R/interactive_crop.R

interactive_cropR Documentation

interactive cropping

Description

Using image_crop of 'magick' interactively. geometry is a parameter of image_crop. See reference manual of 'magick' for detail.

Usage

interactive_crop(image, color = "white", return_param = FALSE, scale)

Arguments

image

a magick image object

color

color of background. a valid color string such as "navyblue" or "#000080". "none" is not allowed.

return_param

If return_param is TRUE, returns a value of geometry. If return_param is FALSE, returns a magick image object.

scale

geometry to be passed to image_scale function of magick package. image is scaled just for preview and result image is not scaled if scale is given.

Value

a magick image object or a value of geometry.

Author(s)

Shota Ochi

Examples


if (interactive())
{
  interactive_crop(wizard)
}


magickGUI documentation built on Sept. 11, 2023, 5:06 p.m.