Sets the image gravity

- « Imagick::setImageGamma

- Imagick::setImageGreenPrimary »

- PHP Manual
- Imagick
- Sets the image gravity

# Imagick::setImageGravity

(PECL imagick 2 >= 2.3.0, PECL imagick 3)

Imagick::setImageGravity — Sets the image gravity

### Description

public Imagick::setImageGravity(int `$gravity`): bool

Sets the gravity property for the current image. This method can be used to set the gravity property for a single image sequence. This method is available if Imagick has been compiled against ImageMagick version 6.4.4 or newer.

### Parameters

`gravity`

  The gravity property. Refer to the list of gravity constants.

### Return Values

No value is returned.