imageconvolution() function in PHP

The imageconvolution() function

Syntax

bool imageconvolution (img, matrix, div, offset )

Parameters

  • img: Create image with imagecreatetruecolor() function.

  • matrix: A 3x3 matrix is an array of three arrays of three floats.

  • div: Divisor of the result of the convolution, used for normalization.

  • offset: The color offset.

Return

The imageconvolution() function returns True on success or False on failure.

Example

The following is an example

Output

The following is the output

Example

Let us see another example with different parameter values for the same image. You can easily spot the difference now:

Output

The following is the output

Updated on: 2019-12-31T08:00:58+05:30

174 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements