PHP Developers Network
http://forums.devnetwork.net/

cropping images with gd
http://forums.devnetwork.net/viewtopic.php?f=32&t=24187
Page 1 of 1

Author:  nigma [ Thu Jul 22, 2004 4:07 pm ]
Post subject:  cropping images with gd

Which function in the gd library is used for cropping images? imagecopyresampled() ?

Would someone provide an example of using the function to crop an image ?

Author:  feyd [ Thu Jul 22, 2004 4:16 pm ]
Post subject: 

pass a source rect that differs from the image's dimensions.

Moved to Graphics

Author:  nigma [ Thu Jul 22, 2004 4:44 pm ]
Post subject: 

could you elaborate? I don't really even understand what some of the function args do.

Here is the function call i'm playing with trying to get the image cropped:
imagecopyresampled($im,$im, 0,0,0,0, 2*602,2*324, 602,324);

i'd like to crop an image that is 602*2 in width and 324*2 in height to a w/h of 602, 324.

Author:  nigma [ Thu Jul 22, 2004 4:47 pm ]
Post subject: 

btw, am i using thr right function to crop?

Author:  feyd [ Thu Jul 22, 2004 4:55 pm ]
Post subject: 


Author:  nigma [ Thu Jul 22, 2004 5:14 pm ]
Post subject: 

When I said I didn't even fully understand what all the arguments do I didn't mean to imply that I hadn't read the php.net manual on the function.

Author:  feyd [ Thu Jul 22, 2004 5:16 pm ]
Post subject: 

I wasn't implying you hadn't.. just posting it for easier clarification. Your post said that the source image was 1204x648.. but you passed those as your destination request..

Author:  nigma [ Thu Jul 22, 2004 7:39 pm ]
Post subject: 


Author:  feyd [ Thu Jul 22, 2004 8:13 pm ]
Post subject: 


Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/