| LAST | Copying, Resizing and Rotating functions | NEXT |
| Transformations on an image like resizing and rotating are achieved indirectly by applying the transformation while copying a source image to a destination. | ||||
| 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) Copies a part of src_im onto dst_im starting at the x, y coordinates src_x, src_y with a width of src_w and a height of src_h. The portion defined will be copied onto the x, y coordinates, dst_x and dst_y. |
||||
![]() |
+ | ![]() |
=> | ![]() |
| int imageCopyMerge ( resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct) Copies a part of src_im onto dst_im starting at the x, y coordinates src_x, src_y with a width of src_w and a height of src_h. The portion defined will be copied onto the x, y coordinates, dst_x and dst_y. The two images will be merged according to pct which can range from 0 to 100. When pct = 0, no action is taken, when 100 this function behaves identically to imageCopy(). |
||||
![]() |
+ | ![]() |
=> | ![]() |
| int imageCopyMergeGray ( resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct) Copies a part of src_im onto dst_im starting at the x, y coordinates src_x, src_y with a width of src_w and a height of src_h. The portion defined will be copied onto the x, y coordinates, dst_x and dst_y. The two images will be merged according to pct which can range from 0 to 100. When pct = 0, no action is taken, when 100 this function behaves identically to imageCopy(). This function is identical to imageCopyMerge() except that when merging it preserves the hue of the source by converting the destination pixels to gray scale before the copy operation. |
||||
![]() |
+ | ![]() |
=> | ![]() |
| int imageCopyResized ( resource dst_im, resource src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH) Copies a rectangular portion of one image to another image. dst_im is the destination image, src_im is the source image identifier. If the source and destination coordinates and width and heights differ, appropriate stretching or shrinking of the image fragment will be performed. The coordinates refer to the upper left corner. This function can be used to copy regions within the same image (if dst_im is the same as src_im) but if the regions overlap the results will be unpredictable. |
||||
![]() |
+ | ![]() |
=> | ![]() |
| int imageCopyResampled ( resource dst_im, resource src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH) Copies a rectangular portion of one image to another image, smoothly interpolating pixel values so that, in particular, reducing the size of an image still retains a great deal of clarity. dst_im is the destination image, src_im is the source image identifier. If the source and destination coordinates and width and heights differ, appropriate stretching or shrinking of the image fragment will be performed. The coordinates refer to the upper left corner. This function can be used to copy regions within the same image (if dst_im is the same as src_im) but if the regions overlap the results will be unpredictable. |
||||
![]() |
+ | ![]() |
=> | ![]() |
| bool imageColorMatch ( resource image1, resource image2) Makes the colors of the palette version of an image more closely match the true color version. image1 must be Truecolor, image2 must be Palette, and both image1 and image2 must be the same size. |
||||
![]() |
+ | ![]() |
=> | ![]() |
| int imagePaletteCopy ( resource destination, resource source) Copies the palette from the source image to the destination image. |
||||
![]() |
+ | ![]() |
=> | ![]() |
| resource imageRotate ( resource src_im, float angle, int bgd_color ) Rotates the src_im image using a given angle in degree. bgd_color specifies the color of the uncovered zone after the rotation. |
||||
![]() |
=> | ![]() |
||
| LAST | Table of Contents | Function Index | NEXT |