【发布时间】:2019-09-10 22:42:57
【问题描述】:
我尝试使用 magick::image_rotate() 旋转图像以获得不同的旋转角度 mapply 和 image_rotate 没有得到正确的输入
easterEggs <- c(
'https://cdn.pixabay.com/photo/2017/02/04/20/28/easter-2038263_960_720.png',
'https://cdn.pixabay.com/photo/2016/12/15/11/41/easter-1908690_960_720.png',
'https://cdn.pixabay.com/photo/2017/03/28/09/56/easter-egg-2181493_960_720.png',
'https://cdn.pixabay.com/photo/2019/01/29/13/49/egg-3962420_960_720.png',
'https://cdn.pixabay.com/photo/2018/02/25/09/44/easter-3180067_960_720.png'
)
egg <- image_read(easterEggs)
eggRotation <- runif(length(egg), -90, 90)
egg <- mapply(image_rotate, egg, eggRotation)
这会导致错误
Error: The 'image' argument is not a magick image object.
【问题讨论】:
标签: r imagemagick apply mapply