©
This document uses PHP Chinese website manual Release
(PECL imagick 2.0.0)
ImagickPixelIterator::__construct — The ImagickPixelIterator constructor
$wand
)本函数还未编写文档,仅有参数列表。
The ImagickPixelIterator constructor
成功时返回 TRUE
。
Example #1 ImagickPixelIterator::construct()
<?php
function construct ( $imagePath ) {
$imagick = new \ Imagick ( realpath ( $imagePath ));
$imageIterator = new \ ImagickPixelIterator ( $imagick );
foreach ( $imageIterator as $pixels ) {
foreach ( $pixels as $column => $pixel ) {
if ( $column % 2 ) {
$pixel -> setColor ( "rgba(0, 0, 0, 0)" );
}
}
$imageIterator -> syncIterator ();
}
header ( "Content-Type: image/jpg" );
echo $imagick ;
}
?>