Create a new image cropped by a circle mask and leave a margin

circropper(input_path, margin)

Arguments

input_path

character the image file path

margin

double the distance between circle boundary and the original image boundary

Value

a cropped image

Examples

path <- system.file("tmp_image", "mandrill.jpg", package = "rimager") circropper(path, 20)
#> # A tibble: 1 x 7 #> format width height colorspace matte filesize density #> <chr> <int> <int> <chr> <lgl> <int> <chr> #> 1 PNG 298 298 sRGB FALSE 0 72x72