PHP 8.3.4 Released!

Imagick::setImageArtifact

(PECL imagick 3)

Imagick::setImageArtifactSet image artifact

Beschreibung

public Imagick::setImageArtifact(string $artifact, string $value): bool

Associates an artifact with the image. The difference between image properties and image artifacts is that properties are public and artifacts are private. Diese Funktion ist verfügbar, wenn Imagick gegen die ImageMagick-Version 6.5.7 oder höher kompiliert wurde.

Parameter-Liste

artifact

The name of the artifact

value

The value of the artifact

Rückgabewerte

Liefert true bei Erfolg.

Fehler/Exceptions

Wirft ImagickException bei Fehlern.

Beispiele

Beispiel #1 Imagick::setImageArtifact()

<?php
function setImageArtifact() {

$src1 = new \Imagick(realpath("./images/artifact/source1.png"));
$src2 = new \Imagick(realpath("./images/artifact/source2.png"));

$src2->setImageVirtualPixelMethod(\Imagick::VIRTUALPIXELMETHOD_TRANSPARENT);
$src2->setImageArtifact('compose:args', "1,0,-0.5,0.5");
$src1->compositeImage($src2, Imagick::COMPOSITE_MATHEMATICS, 0, 0);

$src1->setImageFormat('png');
header("Content-Type: image/png");
echo
$src1->getImagesBlob();
}

?>

Siehe auch

add a note

User Contributed Notes

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