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:

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)

try imagecopyresampled($image_p, $image, 0, 0, 0, 0, 765, 810, 665, 1000)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to