PHP script to convert multiple images into a video with imagick

纵饮孤独 提交于 2020-01-03 05:45:08

问题


I found this command line that uses ImageMagick to convert images into a video:

ImageMagick convert -delay 100 -quality 75 1.jpg 2.jpg movie.mpg

Is there a way to do this in php with imagick? I am trying to find a way to do this on a website.

My google-fu has failed me and I appreciate any help :)


回答1:


Considering that convert is the executable program you're using from the command-line, the simplest solution would be to use it from your PHP scripts ;-)


About that, you'll want to read through the System program execution section of the manual.

You'll probably be especially interested by exec() and/or shell_exec() -- and do not forget to escape your arguments, with escapeshellarg().



来源:https://stackoverflow.com/questions/5121306/php-script-to-convert-multiple-images-into-a-video-with-imagick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!