您的位置首页百科知识

moviepy 找不到ImageMagick 的问题

moviepy 找不到ImageMagick 的问题

的有关信息介绍如下:

moviepy 找不到ImageMagick 的问题

在moviepy做Image Clip时发现ImageMagick 找不到,python 系统报错:

.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect

代码如下:

grad = color_gradient(moving_txt.size,p1=(0,2*h/3), p2=(0,h/4),col1=0.0,col2=1.0)gradmask = ImageClip(grad,ismask=True)

在调用ImageClip 有异常发生,系统报错

解决办法:

修改moviepy 安装包下的config_default.py 下的IMAGEMAGICK_BINARY 为默认状态为:

IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'auto-detect')

而不能按本文档说说的做法: