PHP 8.5.0 RC 2 available for testing

Imagick::adaptiveBlurImage

(PECL imagick 2, PECL imagick 3)

Imagick::adaptiveBlurImage β€” Adds adaptive blur filter to image

Опис

public Imagick::adaptiveBlurImage(float $radius, float $sigma, int $channel = Imagick::CHANNEL_DEFAULT): bool

Adds an adaptive blur filter to image. The intensity of an adaptive blur depends is dramatically decreased at edge of the image, whereas a standard blur is uniform across the image. Π¦Π΅ΠΉ ΠΌΠ΅Ρ‚ΠΎΠ΄ доступний, якщо Imagick Π·Ρ–Π±Ρ€Π°Π½ΠΈΠΉ Π· ImageMagick вСрсії 6.2.9 Π°Π±ΠΎ Π½ΠΎΠ²Ρ–ΡˆΠΎΡŽ.

ΠŸΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΈ

radius

The radius of the Gaussian, in pixels, not counting the center pixel. Provide a value of 0 and the radius will be chosen automagically.

sigma

The standard deviation of the Gaussian, in pixels.

channel

ΠšΠΎΠ½ΡΡ‚Π°Π½Ρ‚Π° ΠΊΠ°Π½Π°Π»Ρƒ, дійсна для ΠΏΠΎΡ‚ΠΎΡ‡Π½ΠΎΠ³ΠΎ Ρ€Π΅ΠΆΠΈΠΌΡƒ ΠΊΠ°Π½Π°Π»Ρƒ. Для застосування Ρ—Ρ— Π΄ΠΎ ΠΊΡ–Π»ΡŒΠΊΠΎΡ… ΠΊΠ°Π½Π°Π»Ρ–Π² Π½Π΅ΠΎΠ±Ρ…Ρ–Π΄Π½ΠΎ ΠΏΠΎΡ”Π΄Π½Π°Ρ‚ΠΈ константи ΠΊΠ°Π½Π°Π»Ρƒ ΠΏΠΎΠ±Ρ–Ρ‚ΠΎΠ²ΠΈΠΌΠΈ ΠΎΠΏΠ΅Ρ€Π°Ρ‚ΠΎΡ€Π°ΠΌΠΈ. Π‘Ρ‚Π°Π½Π΄Π°Ρ€Ρ‚Π½ΠΎ β€” Imagick::CHANNEL_DEFAULT. Π”ΠΈΠ². список констант ΠΊΠ°Π½Π°Π»Ρƒ.

ЗначСння, Ρ‰ΠΎ ΠΏΠΎΠ²Π΅Ρ€Ρ‚Π°ΡŽΡ‚ΡŒΡΡ

ΠŸΠΎΠ²Π΅Ρ€Ρ‚Π°Ρ” true Π² Ρ€Π°Π·Ρ– успіху.

Помилки/Π²ΠΈΠΊΠ»ΡŽΡ‡Π΅Π½Π½Ρ

ΠšΠΈΠ΄Π°Ρ” ImagickException Π² Ρ€Π°Π·Ρ– ΠΏΠΎΠΌΠΈΠ»ΠΊΠΈ.

ΠŸΡ€ΠΈΠΊΠ»Π°Π΄ΠΈ

ΠŸΡ€ΠΈΠΊΠ»Π°Π΄ #1 Using Imagick::adaptiveBlurImage():

Adaptively blur an image, then display to the browser.

<?php

header
('Content-type: image/jpeg');

$image = new Imagick('test.jpg');

$image->adaptiveBlurImage(5,3);
echo
$image;

?>

Поданий Π²ΠΈΡ‰Π΅ ΠΏΡ€ΠΈΠΊΠ»Π°Π΄ Π²ΠΈΠ²Π΅Π΄Π΅ Ρ‰ΠΎΡΡŒ схоТС Π½Π°:

Output of example : Using Imagick::adaptiveBlurImage()

ΠŸΡ€ΠΎΠ³Π»ΡΠ½ΡŒΡ‚Π΅ Ρ‚Π°ΠΊΠΎΠΆ

οΌ‹add a note

User Contributed Notes 1 note

up
1
michael at dodwell dot us ΒΆ
11 years ago
Be aware that this function is extremely CPU intensive.
To Top