Imagick::setImageArtifact

(No version information available, might only be in Git)

Imagick::setImageArtifactSet image artifact

说锟斤拷

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. 锟剿凤拷锟斤拷锟斤拷Imagick锟斤拷锟斤拷ImageMagick 6.5.7锟斤拷锟较版本锟斤拷锟斤拷时锟斤拷锟矫★拷

锟斤拷锟斤拷

artifact

The name of the artifact

value

The value of the artifact

锟斤拷锟斤拷值

锟缴癸拷时锟斤拷锟斤拷 TRUE锟斤拷

锟斤拷锟斤拷锟届常

锟斤拷锟斤拷时锟阶筹拷 ImagickException锟斤拷

锟轿硷拷

锟斤拷锟斤拷

Example #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($src2Imagick::COMPOSITE_MATHEMATICS00);
    
    
$src1->setImageFormat('png');
    
header("Content-Type: image/png");
    echo 
$src1->getImagesBlob();
}

?>