GoLang Imagick::setImageArtifact

request it (357)
GoLang replacement for PHP's Imagick::setImageArtifact [edit | history]



Do you know a GoLang replacement for PHP's Imagick::setImageArtifact? Write it!

PHP Imagick::setImageArtifact

PHP original manual for Imagick::setImageArtifact [ show | php.net ]

Imagick::setImageArtifact

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

Imagick::setImageArtifactSet image artifact

Description

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

Associates an artifact with the image. The difference between image properties and image artifacts is that properties are public and artifacts are private. This method is available if Imagick has been compiled against ImageMagick version 6.5.7 or newer.

Parameters

artifact

The name of the artifact

value

The value of the artifact

Return Values

Returns TRUE on success.

Errors/Exceptions

Throws ImagickException on error.

See Also

Examples

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();
}

?>