cut portion of image
Posted: Wed Apr 12, 2006 5:37 pm
Hello,
I was wondering if it is possable to take an image, crop out a segment, and save that segment as a different file. I looked at the ImageCopy function, but I am sort of lost in it...the php manual does not elaborate much on it.
Here is what I have found:
I can understand that it calls for in each parameter, but I am confused on how to set the first two : the resources. At first, I tried inserting a direct file name, but that did not work. Then, I called a variable that stored the fopen() of the image, and that did not work either.
IF this function does what I want it to do, how do I need to call it. If it does not do what I need, how can I accomplish my task?
I was wondering if it is possable to take an image, crop out a segment, and save that segment as a different file. I looked at the ImageCopy function, but I am sort of lost in it...the php manual does not elaborate much on it.
Here is what I have found:
Code: Select all
int ImageCopy (resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)IF this function does what I want it to do, how do I need to call it. If it does not do what I need, how can I accomplish my task?