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

Imagick::recolorImage

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

Imagick::recolorImage — Recolors image

Description

代码语言:javascript
复制
bool Imagick::recolorImage ( array $matrix )

Translate, scale, shear, or rotate image colors. This method supports variable sized matrices but normally 5x5 matrix is used for RGBA and 6x6 is used for CMYK. The last row should contain the normalized values. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer.

Parameters

matrix

The matrix containing the color values

Return Values

Returns TRUE on success.

See Also

  • Imagick::displayImage() - Displays an image

Examples

Example #1 Imagick::recolorImage()

代码语言:javascript
复制
<?php
function?recolorImage($imagePath)?{
????$imagick?=?new?\Imagick(realpath($imagePath));
????$remapColor?=?[?1,?0,?0,
????????0,?0,?1,
????????0,?1,?0,];

//$remapColor?=?[
//????1.438,?-0.122,?-0.016,??0,?0,?-0.03,
//????-0.062,??1.378,?-0.016,??0,?0,??0.05,
//????-0.062,?-0.122,?1.483,???0,?0,?-0.02,
//];

????@$imagick->recolorImage($remapColor);

????header("Content-Type:?image/jpg");
????echo?$imagick->getImageBlob();
}

?>

← Imagick::readimages

Imagick::reduceNoiseImage →

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com