PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

ImagickPixelIterator::getNextIteratorRow - pixel iterator の次の行を返す | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

ImagickPixelIterator::getNextIteratorRow

(PECL imagick 2.0.0)

ImagickPixelIterator::getNextIteratorRowpixel iterator の次の行を返す

説明

array ImagickPixelIterator::getNextIteratorRow ( void )
警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。

pixel iterator の次の行を、pixel wands の配列として返します。

返り値

次の行を ImagickPixel オブジェクトの配列で返します。 エラー時には ImagickPixelIteratorException をスローします。

例1 ImagickPixelIterator::getNextIteratorRow()

<?php
function getNextIteratorRow($imagePath) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imageIterator $imagick->getPixelIterator();

    
$count 0;
    while (
$pixels $imageIterator->getNextIteratorRow()) {
        if ((
$count 3) == 0) {
            
/* Loop through the pixels in the row (columns) */
            
foreach ($pixels as $column => $pixel) { 
                
/** @var $pixel \ImagickPixel */
                
if ($column 2) {
                    
/* Paint every second pixel black*/
                    
$pixel->setColor("rgba(0, 0, 0, 0)");
                }
            }
            
/* Sync the iterator, this is important to do on each iteration */
            
$imageIterator->syncIterator(); 
        }

        
$count += 1;
    }

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

?>


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「ImagickPixelIterator::getNextIteratorRow - pixel iterator の次の行を返す」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | ImagickPixelIterator::getNextIteratorRow - pixel iterator の次の行を返す」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: