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

ImagickPixelIterator::__construct - ImagickPixelIterator のコンストラクタ | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

ImagickPixelIterator::__construct

(PECL imagick 2.0.0)

ImagickPixelIterator::__constructImagickPixelIterator のコンストラクタ

説明

ImagickPixelIterator::__construct ( Imagick $wand )
警告

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

ImagickPixelIterator のコンストラクタです。

返り値

成功した場合に TRUE を返します。

例1 ImagickPixelIterator::construct()

<?php
function construct($imagePath) {
    
$imagick = new \Imagick(realpath($imagePath));
    
$imageIterator = new \ImagickPixelIterator($imagick);

    
/* Loop through pixel rows */
    
foreach ($imageIterator as $pixels) { 
        
/* 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();
    }

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

?>


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

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