HomeImagickImagickDrawImagickPixelImagick Pixel IteratorImagick KernelDevelopmentTutorial Source codeReport an issue
Category
Example

get matrix

← fromBuiltIn   scale →
Get the 2d matrix of values used in this kernel. The elements are either float for elements that are used or 'false' if the element should be skipped.

The built-in kernel name 'ring' with parameters of '2,3.5':
falsefalse111falsefalse
false11false11false
11falsefalsefalse11
1falsefalsefalsefalsefalse1
11falsefalsefalse11
false11false11false
falsefalse111falsefalse
Or as an image:

Example

$output = "The built-in kernel name 'ring' with parameters of '2,3.5':<br/>";
$kernel = \ImagickKernel::fromBuiltIn(
    \Imagick::KERNEL_RING,
    "2,3.5"
);
$matrix = $kernel->getMatrix();
$output .= Display::renderKernelTable($matrix);
$output .= "Or as an image: <img src='/customImage/ImagickKernel/getMatrix'/>";
return $output;