R/recaptureimage.R

Defines functions recaptureImage

recaptureImage <- function(file_path_input, fname, size_x, size_y){

    #PREPARE THE IMAGE
    img_path <- file.path(file_path_input, fname)
    img <- imager::load.image(img_path)
    image <- grDevices::as.raster(imager::resize(img, size_x = size_x, size_y = size_y))
    return(image)
}

Try the boundingbox package in your browser

Any scripts or data that you put into this service are public.

boundingbox documentation built on July 1, 2020, 11:50 p.m.