jpopuk Posted February 6, 2008 Share Posted February 6, 2008 Hi, I have a script that automatically creates thumbnails for images once uploaded. I currently have a script for when it auto crops an image to a thumbnail. Here is the code: function crop($x, $y, $width, $height) { if(!$this->error) { $tmpimage = imagecreatetruecolor($width, $height); imagecopyresampled($tmpimage, $this->img, 0, 0, $x, $y, $width, $height, $width, $height); imagedestroy($this->img); $this->img = $tmpimage; $this->y = $height; $this->x = $width; } } What I want to be able to do is change the way the image crops, I want it to zoom into an image more, so like when it crops I want it to take a smaller scale of an image and crop it. Does that make sense to any one? If they can help I would really appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/89779-thumbnail-crop-resize/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.