imagemagick扭曲或扭曲图像

net*_*ase 4 php typo3 imagemagick

那么我怎样才能使用imagemagick将之前的图像更改为后图像?是-skew命令还是-distort,我怎样才能在typo3和php中使用它?

任何帮助表示赞赏!

之前和之后

Bon*_*nzo 7

使用Imagemagick与php和命令行:

// Working on the original image size of 400 x 300
$cmd = "before.jpg -matte -virtual-pixel transparent".  
" +distort Perspective \"0,0 0,0  400,0 400,22  400,300 400,320  0,300 0,300 \" "; 
exec("convert $cmd perspective.png");
Run Code Online (Sandbox Code Playgroud)

注意:1 /这适用于Imagemagick的更高版本 - 透视操作符已更改.2 /你需要使用+ distort not -distort,因为图像大于初始图像boundrys.

在我的网站上使用php的Imagemagick示例http://www.rubblewebs.co.uk/imagemagick/operator.php