
August 12th, 2002, 01:06 AM
|
|
Contributing User
|
|
Join Date: Jul 2000
Posts: 456
Time spent in forums: 1 Day 1 h 7 m 3 sec
Reputation Power: 13
|
|
|
make a quick buck: php function needed
I have a script that does some image manipulation with the GD library. It does almost everything I need, but I am stuck on how to crop an image. So... a quick $20 for anyone who can write me a function that does the following:
Accepts 5 parameters:
- image identifer
in this example $im is identifier: $im = imagecreatefromjpeg($logosource)
- upper left x pos
- upper left y pos
- lower right x pos
- lower right y pos
Based on that it should crop the image down to the rectangular area bound by the upper left and lower right position specified.
imagecopyresized() may be the function you'll need. If you can't actually crop $im, rather you have to copy the specified portion of $im to a new image, sized the same as the part being cropped (I think that is a good approach), this is fine.
Any takers? Please email rmckillen@screamingv.com
|