<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.gmagick.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'gmagick.quantizeimages.php',
    1 => 'Gmagick::quantizeimages',
    2 => '画像シーケンス内の色を解析する',
  ),
  'up' => 
  array (
    0 => 'class.gmagick.php',
    1 => 'Gmagick',
  ),
  'prev' => 
  array (
    0 => 'gmagick.quantizeimage.php',
    1 => 'Gmagick::quantizeimage',
  ),
  'next' => 
  array (
    0 => 'gmagick.queryfontmetrics.php',
    1 => 'Gmagick::queryfontmetrics',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/gmagick/gmagick/quantizeimages.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="gmagick.quantizeimages" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Gmagick::quantizeimages</h1>
  <p class="verinfo">(PECL gmagick &gt;= Unknown)</p><p class="refpurpose"><span class="refname">Gmagick::quantizeimages</span> &mdash; <span class="dc-title">画像シーケンス内の色を解析する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-gmagick.quantizeimages-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Gmagick::quantizeimages</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$numColors</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$colorspace</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$treeDepth</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$dither</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$measureError</code></span><br>): <span class="type"><a href="class.gmagick.php" class="type Gmagick">Gmagick</a></span></div>

  <p class="simpara">
   画像シーケンス内の色を解析し、その画像を表すための色を固定の色数で選びます。
   そのアルゴリズムの目標は、入力画像と出力画像の色の差を最小限に抑えながらも
   処理時間を短くすることです。
  </p>



 </div>


 <div class="refsect1 parameters" id="refsect1-gmagick.quantizeimages-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">numColors</code></dt>
    <dd>
     <span class="simpara">
      色数。
     </span>
    </dd>
   
   
    <dt><code class="parameter">colorspace</code></dt>
    <dd>
     <span class="simpara">
      この色空間の中で色数を減らす。通常は RGBColorspace。
     </span>
    </dd>
   
   
    <dt><code class="parameter">treeDepth</code></dt>
    <dd>
     <span class="simpara">
      通常は、この整数値は 0 か 1 になります。
      0 あるいは 1 を指定すると、Quantize に最適なツリーの深さとして Log4(number_colors) を選ばせます。
      この深さのツリーは一般に、最小のメモリー消費で最大の計算速度を得られる最良の参照画像表現法になります。
      色数が少ないなど、場合によっては Log4(number_colors) 以外の値が必要になることもあります。
      色ツリーを完全に広げるには、この値を 8 にします。
     </span>
    </dd>
   
   
    <dt><code class="parameter">dither</code></dt>
    <dd>
     <span class="simpara">
      ゼロ以外の値を元の画像との間の違いに分配し、
      対応する減色アルゴリズムを近傍ピクセルとのヒルベルト曲線に沿ったものにします。
     </span>
    </dd>
   
   
    <dt><code class="parameter">measureError</code></dt>
    <dd>
     <span class="simpara">
      ゼロ以外の値で、元画像と量子化した画像の違いを計測します。
      この違いが、全体の量子化エラーになります。
      エラーを判定するために、画像内の全ピクセルを計算し、
      RGB 空間において参照画像と量子化語のピクセルの差を合計します。
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-gmagick.quantizeimages-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="simpara">
   成功した場合に Gmagick オブジェクトを返します。
  </p>
 </div>


  <div class="refsect1 errors" id="refsect1-gmagick.quantizeimages-errors">
  <h3 class="title">エラー / 例外</h3>
  <p class="simpara">
   エラー時に
<span class="classname"><strong class="classname">GmagickException</strong></span> をスローします。
  </p>
 </div>

</div><?php manual_footer($setup); ?>