Documentación offline PHP master

ImagickKernel::scale

master Ver versión oficial en línea Licencia CC-BY-3.0Descargado el 2026-08-02

En esta página

ImagickKernel::scale

Redimensiona una lista de núcleos por la cantidad dada

Descripción#

public ImagickKernel::scale(float $scale, [int $normalizeFlag]): void
```php

Redimensiona la lista de núcleos dada por la cantidad dada, con o sin normalización de la suma de los valores del núcleo (según los indicadores dados). El comportamiento exacto de esta función depende del tipo de normalización utilizado consúltense http://www.imagemagick.org/api/morphology.php#ScaleKernelInfo para más detalles.

## Parámetros

`scale`  

`normalizeFlag`  
Imagick::NORMALIZE_KERNEL_NONE, Imagick::NORMALIZE_KERNEL_VALUE, Imagick::NORMALIZE_KERNEL_CORRELATE, Imagick::NORMALIZE_KERNEL_PERCENT

## Valores devueltos

## Ejemplos

`ImagickKernel::scale`
"; foreach ($matrix as $row) { $output .= ""; foreach ($row as $cell) { $output .= ""; if ($cell === false) { $output .= "false"; } else { $output .= round($cell, 3); } $output .= ""; } $output .= ""; } $output .= ""; return $output; } $output = ""; $matrix = [ [-1, 0, -1], [ 0, 4, 0], [-1, 0, -1], ]; $kernel = \ImagickKernel::fromMatrix($matrix); $kernelClone = clone $kernel; $output .= "Núcleo inicial
"; $output .= renderKernelTable($kernel->getMatrix()); $output .= "Redimensionamiento con NORMALIZE_KERNEL_VALUE. El
"; $kernel->scale(2, \Imagick::NORMALIZE_KERNEL_VALUE); $output .= renderKernelTable($kernel->getMatrix()); $kernel = clone $kernelClone; $output .= "Redimensionamiento por porcentaje
"; $kernel->scale(2, \Imagick::NORMALIZE_KERNEL_PERCENT); $output .= renderKernelTable($kernel->getMatrix()); $matrix2 = [ [-1, -1, 1], [ -1, false, 1], [1, 1, 1], ]; $kernel = \ImagickKernel::fromMatrix($matrix2); $output .= "Redimensionamiento por correlación
"; $kernel->scale(1, \Imagick::NORMALIZE_KERNEL_CORRELATE); $output .= renderKernelTable($kernel->getMatrix()); return $output; ?>

```php