dongyun3897 2016-03-08 18:11
浏览 36

将bash命令转换为php imagick函数

I'm new to imagick. any one can convert the following bash command to php imagick function.

convert black.jpg shirt_mask.png -alpha off -compose copy_opacity -composite -evaluate add 30% \-alpha on -background "gray(50%)" -alpha background -alpha off tshirt_process.png
  • 写回答

1条回答 默认 最新

  • duangao7133 2016-03-08 18:38
    关注

    It would be faster to just use php exec function in your case:

    exec("convert black.jpg shirt_mask.png -alpha off -compose copy_opacity -composite -evaluate add 30% \-alpha on -background "gray(50%)" -alpha background -alpha off tshirt_process.png");
    

    http://php.net/manual/en/function.exec.php

    评论

报告相同问题?