Re: crop an image
| From: | Edward Vermillion | Date: | Tue, 06 Nov 2007 16:51:31 +0000 |
| Subject: | Re: crop an image | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264124@lists.php.net to get a copy of this message | ||
On Nov 6, 2007, at 10:20 AM, Chris Bruce wrote:
Does anyone have some insight here? I am trying to crop an image. The crop seems to almost work, but I get black bars on the image. Has anyone had any experience with cropping images using the GD library? Thanks. Chris On Nov 2, 2007, at 5:41 PM, Chris Bruce wrote:try imagecopyresampled($image_p, $image, 0, 0, 0, 0, 765, 810, 665, 1000)What was the solution here? I am trying to crop but am getting a black bar the same height as the crop at top. For this image I want to crop 40 pixels off of the top: $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($jpegpath); imagecopyresampled($image_p, $image, 0, 0, 0, 40, 765, 810, 665, 1000)