how to divide image into three equal parts in php imagemagick and combine with some padding and output as single image

前端 未结 2 1897
生来不讨喜
生来不讨喜 2021-01-24 06:59

I want to display an image into three parts as triptych with the help of imagemagick PHP library. I saw the same example here

http://www.rubbleimages.com/Canvas.php.

2条回答
  •  长发绾君心
    2021-01-24 07:46

    $cmd = " convert $photo  -crop 33.5%x100%  +repage  -raise 5x1      "."    monet_horizontal_%d.jpg";
    
    exec($cmd);
    
    $cmd = " convert monet_horizontal_0.jpg wt.png monet_horizontal_1.jpg wt.png monet_horizontal_2.jpg  +append "."  abc.jpg";
    
    exec($cmd);
    

提交回复
热议问题