exec("/FULL PATH TO SCRIPT/bilinearwarp.sh -virtual-pixel black -distort perspective \"0,0 52,0 255,0 228,46 255,255 255,229 0,255 0,246\" input.jpg output.png 2>&1", $array);
Not quite correct:
1) leave off the 2>&1 as that is only needed when you are trying to get help or other textual information and not output images.
2) this is not the syntax for my script. it seems to be mixing my bilinearwarp with a normal perspective command in ONE command line. You cannot do that. You can run my bilinear or run a simple -distort perspective in one command. But not both.
If you want to run a simple -distort perspective, then the syntax is (command line)
convert input.jpg -virtual-pixel black -distort perspective " 4 pairs of x,y control points in the correct ordering" output.png
If you want to run my bilinearwarp script (which is very slow and you are better running -distort perspective unless you actually want the curved sides), then although I am not sure of the exact PHP code, try
exec("/FULL PATH TO SCRIPT/bilinearwarp.sh -v transparent -f box \"4 pairs of x,y control points\" input.jpg output.png", $array);
the -distort perspective is not part of my script and -v black is the default. You may have to decide to specify -f (format for output) as box or input. The default is a bounding box just large enough to hold the result.
I am trying to get sort of a reverse Star Wars text effect
I don't know what this is to be able to help. You will need to provide an example or explain further.
The following perspective should work, but I don't use PHP to be sure,
exec("full path to/convert $input -channel rgba -matte -virtual-pixel transparent -distort perspective \"4 pairs of x,y control points\" $output", $array);
But you have not supplied enough control points (only 2 and you need 4 pairs of x,y.
You need srcx1,srcy1 destx1,desty1 ... srcx4,srcy4 destx4,desty4 with the more recent versions of IM. The scr correspond to the corners of the image and dest to where you want the corners to be moved.
(A while back the order of the control points was changed)
see Bonzo's information above