ImagickKernel::getMatrix

(PECL imagick >= 3.3.0)

ImagickKernel::getMatrixDevuelve la matriz 2D de los valores utilizados en este núcleo

Descripción

public ImagickKernel::getMatrix(): array

Devuelve la matriz 2D de los valores utilizados en este núcleo. Los elementos son flotantes para los elementos que son utilizados, o 'false' si el elemento debe ser ignorado.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Una matriz (array 2D) de los valores que representan el núcleo.

Ejemplos

Ejemplo #1 ImagickKernel::getMatrix()

<?php


function renderKernelTable($matrix) {
$output = "<table class='infoTable'>";

foreach (
$matrix as $row) {
$output .= "<tr>";
foreach (
$row as $cell) {
$output .= "<td style='text-align:left'>";
if (
$cell === false) {
$output .= "false";
}
else {
$output .= round($cell, 3);
}
$output .= "</td>";
}
$output .= "</tr>";
}

$output .= "</table>";

return
$output;
}

$output = "El nombre de núcleo interno 'ring' con parámetros de '2,3.5':<br/>";
$kernel = \ImagickKernel::fromBuiltIn(
\Imagick::KERNEL_RING,
"2,3.5"
);
$matrix = $kernel->getMatrix();
$output .= renderKernelTable($matrix);

echo
$output;

?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top