When working for an exhibition in 2017, I found a new R library that allows nearly every image modification you could think of.
install.packages("magick") library(magick) magick_config()
gives you
image_read(path, density = NULL, depth = NULL) image_write(image, path = NULL, format = NULL, quality = NULL, flatten = FALSE) image_display(image, animate = TRUE) image_browse(image, browser = getOption("browser")) image_append(image, stack = FALSE) image_average(image) image_coalesce(image) image_flatten(image, operator = NULL) image_fft(image) image_map(image, map, dither = FALSE) image_montage(image) image_morph(image, frames) image_mosaic(image, operator = NULL) image_join(...) image_info(image) image_animate(image, fps = 10, loop = 0, dispose = c("background","previous", "none"))