问题
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