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

前端 未结 2 1855
生来不讨喜
生来不讨喜 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:44

    I am hopeless at PHP but something like this seems to work for me:

    #!/usr/local/bin/php -f
    
    

    If I start with this:

    enter image description here

    I get this as a result

    enter image description here

    I added the black outline afterwards so you can see the extent of the image.

提交回复
热议问题