diff --git a/reference/image/functions/imagecopyresampled.xml b/reference/image/functions/imagecopyresampled.xml index b87df94b6e..2180af3f95 100644 --- a/reference/image/functions/imagecopyresampled.xml +++ b/reference/image/functions/imagecopyresampled.xml @@ -1,5 +1,5 @@ - + @@ -10,30 +10,33 @@ Description boolimagecopyresampled - resourcedst_im - resourcesrc_im - intdstX - intdstY - intsrcX - intsrcY - intdstW - intdstH - intsrcW - intsrcH + resourcedst_image + resourcesrc_image + intdst_x + intdst_y + intsrc_x + intsrc_y + intdst_w + intdst_h + intsrc_w + intsrc_h imagecopyresampled 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. &return.success; - dst_im is the destination image, - src_im is the source image identifier. If + retains a great deal of clarity. + &return.success; + + + dst_image is the destination image, + src_image 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 + 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 + same image (if dst_image is the same as + src_image) but if the regions overlap the results will be unpredictable. @@ -50,8 +53,92 @@ ¬e.gd.2; + + + + &reftitle.examples; + - See also imagecopyresized. + + Simple example + + This example will resample an image to half its original size. + + + +]]> + + + + + + + Resampling an image proportionally + + This example will display an image with the maximum width, + or height, of 200 pixels. + + + +]]> + + + + + + + &reftitle.seealso; + + imagecopyresized diff --git a/reference/image/functions/imagecopyresized.xml b/reference/image/functions/imagecopyresized.xml index 39d57648ca..7a91113e44 100644 --- a/reference/image/functions/imagecopyresized.xml +++ b/reference/image/functions/imagecopyresized.xml @@ -1,5 +1,5 @@ - + @@ -8,30 +8,30 @@ Description - - intimagecopyresized - resourcedst_im - resourcesrc_im - intdstX - intdstY - intsrcX - intsrcY - intdstW - intdstH - intsrcW - intsrcH - + + intimagecopyresized + resourcedst_image + resourcesrc_image + intdst_x + intdst_y + intsrc_x + intsrc_y + intdst_w + intdst_h + intsrc_w + intsrc_h + imagecopyresized 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 + dst_image is the destination image, + src_image 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 + 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_image is the same as + src_image) but if the regions overlap the results will be unpredictable. @@ -47,8 +47,55 @@ imagecreatetruecolor. + + + + &reftitle.examples; - See also imagecopyresampled. + + Resizing an image + + This example will display the image at half size. + + + +]]> + + + The image will be output at half size, though better + quality could be obtained using imagecopyresampled. + + + + + + + &reftitle.seealso; + + imagecopyresampled