JImage::crop
Method to crop the current image.
Signature
public function crop(mixed
$width,
[mixed
$height = null,
[integer
$left = null,
[integer
$top = null,
[boolean
$createNew = true]]]] )
Parameters
-
$width
- The width of the image section to crop in pixels or a percentage.
-
$height
- The height of the image section to crop in pixels or a percentage.
-
$left
- The number of pixels from the left to start cropping.
-
$top
- The number of pixels from the top to start cropping.
-
$createNew
- If true the current image will be cloned, cropped and returned; else
Returns
- JImage
Errors/Exceptions
-
LogicException