centerImage: Center and crop the image

View source: R/utility.R

centerImageR Documentation

Center and crop the image

Description

Center and crop the image

Usage

centerImage(
  image,
  x,
  y,
  xProportions = c(0.1, 0.1),
  yProportions = c(0.1, 0.1),
  outputFile = NULL,
  downsample = 0
)

Arguments

image

a file path as a character or a magick-image

x

center x coordinate of the image

y

center y coordinate of the image

xProportions

vector of length 2. If c(0.1,0.1) 20% of the image will be kept in x dimension. 10% to the left and 10% to the right

yProportions

same as xProportions but for y

outputFile

file path of the output. If null, a magick-image is returned

downsample

downsampling used when image was downloaded


oganm/allenBrain documentation built on March 28, 2024, 11:16 p.m.