interactive_quantize: interactive quantization

View source: R/interactive_quantize.R

interactive_quantizeR Documentation

interactive quantization

Description

Using image_quantize of 'magick' interactively. max is a parameter of image_quantize. See reference manual of 'magick' for detail.

Usage

interactive_quantize(
  image,
  colorspace = "rgb",
  dither = NULL,
  treedepth = NULL,
  range_max = 256,
  resolution = 1,
  return_param = FALSE,
  scale
)

Arguments

image

a magick image object

colorspace

specify colorspace. for example, "rgb", "gray", or "cmyk".

dither

apply Floyd/Steinberg error diffusion to the image

treedepth

depth of the quantization color classification tree

range_max

define maximum in slider. must be positive.

resolution

resolution of slider

return_param

If return_param is TRUE, returns value of max. 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 value of max

Author(s)

Shota Ochi

Examples


if (interactive())
{
  interactive_quantize(wizard)
}


ShotaOchi/magickGUI documentation built on Sept. 17, 2023, 5:47 p.m.