How to generate image file using this PHP function?
问题 I've been looking for a GD based solution for adding a perspective transformation to an image and eventually found something that seems promising: http://www.jqueryit.com/2010/03/set-perspective-of-image-using-php-gd.html However, I'm not sure how to actually generate a new image using this function. My approach was this: function perspective($i,$gradient=0.85,$rightdown=true,$background=0xFFFFFF) { $mult=5; $w=imagesx($i); $h=imagesy($i); $image=imagecreatetruecolor($w*$mult,$h*$mult);