From 055cdb7c7e4ade095b003dad1ab36a4c5a18b61d Mon Sep 17 00:00:00 2001 From: Christoph Michael Becker Date: Sun, 9 Oct 2016 11:33:10 +0000 Subject: [PATCH] Document imagecrop() git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340406 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/image/functions/imagecrop.xml | 40 ++++++++++++++++++--- reference/image/functions/imagecropauto.xml | 7 ++++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/reference/image/functions/imagecrop.xml b/reference/image/functions/imagecrop.xml index ba1734bd6f..6db63fd8ea 100644 --- a/reference/image/functions/imagecrop.xml +++ b/reference/image/functions/imagecrop.xml @@ -4,7 +4,7 @@ imagecrop - Crop an image using the given coordinates and size, x, y, width and height + Crop an image to the given rectangle @@ -15,11 +15,10 @@ arrayrect - + Crops an image to the given rectangular area and returns the resulting image. + The given image is not modified. - &warn.undocumented.func; - @@ -30,7 +29,9 @@ rect - Array with keys "x", "y", "width" and "height". + The cropping rectangle as array with keys + x, y, width and + height. @@ -44,6 +45,35 @@ + + &reftitle.examples; + + <function>imagecrop</function> example + + This example shows how to crop an image to a square area. + + + 0, 'y' => 0, 'width' => $size, 'height' => $size]); +if ($im2 !== FALSE) { + imagepng($im2, 'example-cropped.png'); +} +?> +]]> + + + + + + &reftitle.seealso; + + imagecropauto + + +