centerImage: Center and crop the image

Description Usage Arguments

View source: R/utility.R

Description

Center and crop the image

Usage

1
2
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 Aug. 17, 2018, 3:10 p.m.