Gmagick::getimagegreenprimary()函数是PHP中的一个内置函数,用于返回色度绿色主点。此函数返回带有键“x”和“y”的数组。
用法:
array Gmagick::getimagegreenprimary( void )
参数:此函数不接受任何参数。
返回值:此函数返回包含点的x和y坐标的数组值。
异常:此函数在错误时引发GmagickException。
下面给出的程序说明了PHP中的Gmagick::getimagegreenprimary()函数:
程序1:
<?php
// Create a new Gmagick object
// https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png
$gmagick = new Gmagick('geeksforgeeks.png');
// Use the getimagegreenprimary() function
$res = $gmagick->getimagegreenprimary();
print("<pre>".print_r($res, true)."</pre>");
?>输出:
Array
(
[x] => 0.30000001192093
[y] => 0.60000002384186
)
程序2:
<?php
// Create a new Gmagick object
// https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-13.png
$gmagick = new Gmagick('geeksforgeeks.png');
// Use the setimagegreenprimary() function
$gmagick->setimagegreenprimary(6, 8);
// Use the getimagegreenprimary() function
$res = $gmagick->getimagegreenprimary();
print("<pre>".print_r($res, true)."</pre>");
?>输出:
Array
(
[x] => 6
[y] => 8
)
参考: https://www.php.net/manual/en/gmagick.getimagegreenprimary.php
相关用法
- PHP Imagick getImageGreenPrimary()用法及代码示例
- PHP Gmagick minifyimage()用法及代码示例
- PHP Gmagick normalizeimage()用法及代码示例
- PHP Gmagick motionblurimage()用法及代码示例
- PHP Gmagick modulateimage()用法及代码示例
- PHP Gmagick addImage()用法及代码示例
- PHP Gmagick setimageblueprimary()用法及代码示例
- PHP Gmagick shearimage()用法及代码示例
- PHP Gmagick clear()用法及代码示例
- PHP Gmagick getimagehistogram()用法及代码示例
- PHP Gmagick gammaimage()用法及代码示例
- PHP Gmagick resizeimage()用法及代码示例
- PHP Gmagick magnifyimage()用法及代码示例
- PHP Gmagick cropthumbnailimage()用法及代码示例
- PHP Gmagick getimagecompose()用法及代码示例
注:本文由纯净天空筛选整理自gurrrung大神的英文原创作品 PHP | Gmagick getimagegreenprimary() Function。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
