PHP 8.5.0 RC 2 available for testing

Imagick::shadeImage

(PECL imagick 2, PECL imagick 3)

Imagick::shadeImage β€” Creates a 3D effect

Опис

public Imagick::shadeImage(bool $gray, float $azimuth, float $elevation): bool

Shines a distant light on an image to create a three-dimensional effect. You control the positioning of the light with azimuth and elevation; azimuth is measured in degrees off the x axis and elevation is measured in pixels above the Z axis. Π¦Π΅ΠΉ ΠΌΠ΅Ρ‚ΠΎΠ΄ доступний, якщо Imagick Π·Ρ–Π±Ρ€Π°Π½ΠΈΠΉ Π· ImageMagick вСрсії 6.2.9 Π°Π±ΠΎ Π½ΠΎΠ²Ρ–ΡˆΠΎΡŽ.

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

gray

A value other than zero shades the intensity of each pixel.

azimuth

Defines the light source direction.

elevation

Defines the light source direction.

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

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

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

Throws ImagickException on failure.

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

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

<?php
function shadeImage($imagePath) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->shadeImage(true, 45, 20);
header("Content-Type: image/jpg");
echo
$imagick->getImageBlob();
}

?>

οΌ‹add a note

User Contributed Notes

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