Home > PHP > Function > GD > imageconvolution()

imageconvolution()

imageconvolution - Apply a 3x3 convolution matrix, using coefficient and offset

Syntax

bool imageconvolution (resource $image, array $matrix, float $div, float $offset)

Arguments

  • image - An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
  • matrix - A 3x3 matrix: an array of three arrays of three floats.
  • div - The divisor of the result of the convolution, used for normalization.
  • offset - Color offset.

Description

Applies a convolution matrix on the image, using the given coefficient and offset.

Version

PHP 5.1.0

Return value

Returns TRUE on success or FALSE on failure.