<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.imagick.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'imagick.optimizeimagelayers.php',
    1 => 'Imagick::optimizeImageLayers',
    2 => 'Removes repeated portions of images to optimize',
  ),
  'up' => 
  array (
    0 => 'class.imagick.php',
    1 => 'Imagick',
  ),
  'prev' => 
  array (
    0 => 'imagick.opaquepaintimage.php',
    1 => 'Imagick::opaquePaintImage',
  ),
  'next' => 
  array (
    0 => 'imagick.orderedposterizeimage.php',
    1 => 'Imagick::orderedPosterizeImage',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imagick/imagick/optimizeimagelayers.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="imagick.optimizeimagelayers" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::optimizeImageLayers</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::optimizeImageLayers</span> &mdash; <span class="dc-title">Removes repeated portions of images to optimize</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.optimizeimagelayers-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::optimizeImageLayers</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>


  <p class="para rdfs-comment">
   Compares each image the GIF disposed forms of the previous image
   in the sequence.  From this it attempts to select the smallest
   cropped image to replace each frame, while preserving the results
   of the animation. 
   Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.2.9 o successive.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.optimizeimagelayers-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">Questa funzione non contiene parametri.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.optimizeimagelayers-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-imagick.optimizeimagelayers-errors">
  <h3 class="title">Errori/Eccezioni</h3>
  <p class="para">
   Lancia una ImagickException in caso di errore.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-imagick.optimizeimagelayers-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Using <span class="function"><strong>Imagick::optimizeImageLayers()</strong></span></strong></p>
    <div class="example-contents"><p>
      Reading, optimizing and writing a GIF image
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">/* create new imagick object */<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= new </span><span style="color: #0000BB">Imagick</span><span style="color: #007700">(</span><span style="color: #DD0000">"test.gif"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* optimize the image layers */<br /></span><span style="color: #0000BB">$im</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">optimizeImageLayers</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">/* write the image back */<br /></span><span style="color: #0000BB">$im</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">writeImages</span><span style="color: #007700">(</span><span style="color: #DD0000">"test_optimized.gif"</span><span style="color: #007700">, </span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-imagick.optimizeimagelayers-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="imagick.compareimagelayers.php" class="function" rel="rdfs-seeAlso">Imagick::compareImageLayers()</a> - Returns the maximum bounding region between images</span></li>
    <li><span class="function"><a href="imagick.writeimages.php" class="function" rel="rdfs-seeAlso">Imagick::writeImages()</a> - Writes an image or image sequence</span></li>
    <li><span class="function"><a href="imagick.writeimage.php" class="function" rel="rdfs-seeAlso">Imagick::writeImage()</a> - Writes an image to the specified filename</span></li>
   </ul>
  </p>
 </div>


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