r - Error with repeated image_crop() with magick package -
i using magick
package process images. need crop them twice. second time crop, error.
here minimal working example example
library("magick") library("magrittr") img <- image_read(system.file("img", "rlogo.png", package="png")) img %>% image_crop("50x76+50+0") %>% image_crop("10x76+0+0")
which gives error:
error in magick_image_crop(image, geometry) :
magick: geometry not contain image `/home/gbsrt/r/x86_64-pc-linux-gnu-library/3.4/png/img/rlogo.png' @ warning/transform.c/cropimage/574
i think understand why getting error, , need call +repage
, cannot work out how through magick
package.
Comments
Post a Comment