Re: [PHP] crop an image

2007-11-06 Thread Edward Vermillion
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

Re: [PHP] crop an image

2007-11-06 Thread Chris Bruce
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 he

Re: [PHP] crop an image

2007-11-02 Thread Chris Bruce
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

Re: [PHP] crop an image

2007-10-31 Thread Merlin
Merlin schrieb: Hi everybody, I am still strugling with the crop problem. It looks like it is not possible with PHP to do an imagecopyresampled and and imagecopy on the same image. Here is what I try to do: 1: Resize image to 80px width and correct ratio 2: Crop from that image a 80x60 part B

Re: [PHP] crop an image

2007-10-31 Thread Merlin
Hi everybody, I am still strugling with the crop problem. It looks like it is not possible with PHP to do an imagecopyresampled and and imagecopy on the same image. Here is what I try to do: 1: Resize image to 80px width and correct ratio 2: Crop from that image a 80x60 part Both work for them

Re: [PHP] crop an image

2007-10-31 Thread Merlin
David Christopher Zentgraf schrieb: Copying half a pixel? I dare say that's where the problem is. Chrs, Dav On 31 Oct 2007, at 19:34, Merlin wrote: Hi there, I do have a small problem with the proportions of image copy The image is originally vertical in 100px width and 141px height. Now I

Re: [PHP] crop an image

2007-10-31 Thread David Christopher Zentgraf
Copying half a pixel? I dare say that's where the problem is. Chrs, Dav On 31 Oct 2007, at 19:34, Merlin wrote: Hi there, I do have a small problem with the proportions of image copy The image is originally vertical in 100px width and 141px height. Now I want to crop it to 80 px width and 60

[PHP] crop an image

2007-10-31 Thread Merlin
Hi there, I do have a small problem with the proportions of image copy The image is originally vertical in 100px width and 141px height. Now I want to crop it to 80 px width and 60px height. There should be no black area and the proportions should be OK. That means that I have to copy only par