首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

Imagick::setImageArtifact

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

Imagick::setImageArtifact — Set image artifact

Description

代码语言:javascript
复制
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

  • Imagick::getImageArtifact() - Get image artifact
  • Imagick::deleteImageArtifact() - Delete image artifact

Examples

Example #1 Imagick::setImageArtifact()

代码语言:javascript
复制
<?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();
}

?>

← Imagick::setImageAlphaChannel

Imagick::setImageAttribute →

代码语言:txt
复制
 ? 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com