R library rgl cannot find image magick although it is installed

R library rgl cannot find image magick although it is installed and executes from within a cmd shell.

So this does not work:

require(rgl) open3d() rgl.bringtotop() plot3d(foo$x,foo$y,foo$thing,col =heat.colors(256)[1+round(foo$z*255)],xlab = '',ylab='',zlab='',radius=3,size=3,box=T,axes=F) play3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 2) movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 1)

As it barfs:

riting 'movie200.png'Writing 'movie003.png' Error in movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 20) : 'ImageMagick' not found In addition: Warning message: running command 'C:\Windows\system32\cmd.exe /c convert --version' had status 4

The real issue here is that convert is a windows command. On Windows, I believe Imagemagick uses magick for its commands.

So I think rgl needs to use the windows command.

Any ideas?

<strong>Work around</strong>

movie3d(spin3d(axis = c(1, 1, 1), rpm = 10), duration = 12,movie='un1qu3',dir = getwd()) system('magick -delay 10 un1qu3*.png out.gif') file.remove(grep('un1qu\\d+\\.png',list.files(),value = T))

Answer1:

It's a bit old question, but I I've just faced the same problem, and it seems I managed to solve it.

The Rgl package was built to use the convert.exe file from Imagemagick. The problem is that the version of IM currently available for Windows does not contain this file, it uses the magick.exe instead.

What solved the problem for me was actually quite simple: go to the Imagemagick library in Program Files (or the place you installed it), find the 'magick.exe' file, and rename it to 'convert.exe'. :)

人吐槽 人点赞

Recommend

Comment

用户名: 密码:
验证码: 匿名发表

你可以使用这些语言

查看评论:R library rgl cannot find image magick although it is installed