<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.image.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.imagelayereffect.php',
    1 => 'imagelayereffect',
    2 => 'Set the alpha blending flag to use layering effects',
  ),
  'up' => 
  array (
    0 => 'ref.image.php',
    1 => 'Функції GD та Image',
  ),
  'prev' => 
  array (
    0 => 'function.imagejpeg.php',
    1 => 'imagejpeg',
  ),
  'next' => 
  array (
    0 => 'function.imageline.php',
    1 => 'imageline',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/image/functions/imagelayereffect.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imagelayereffect" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagelayereffect</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imagelayereffect</span> &mdash; <span class="dc-title">Set the alpha blending flag to use layering effects</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imagelayereffect-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imagelayereffect</strong></span>(<span class="methodparam"><span class="type"><a href="class.gdimage.php" class="type GdImage">GdImage</a></span> <code class="parameter">$image</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$effect</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Set the alpha blending flag to use layering effects.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imagelayereffect-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    <dt><code class="parameter">image</code></dt><dd><p class="para">Об&#039;єкт
<span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>, що повертається однією з функцій створення
зображення, такою як
<span class="function"><a href="function.imagecreatetruecolor.php" class="function">imagecreatetruecolor()</a></span>.</p></dd>
    
     <dt><code class="parameter">effect</code></dt>
     <dd>
      <p class="para">
       One of the following constants:
       <dl>
        
         <dt><strong><code><a href="image.constants.php#constant.img-effect-replace">IMG_EFFECT_REPLACE</a></code></strong></dt>
         <dd>
          <span class="simpara">
           Use pixel replacement (equivalent of passing <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> to
           <span class="function"><a href="function.imagealphablending.php" class="function">imagealphablending()</a></span>)
          </span>
         </dd>
        
        
         <dt><strong><code><a href="image.constants.php#constant.img-effect-alphablend">IMG_EFFECT_ALPHABLEND</a></code></strong></dt>
         <dd>
          <span class="simpara">
           Use normal pixel blending (equivalent of passing <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> to
           <span class="function"><a href="function.imagealphablending.php" class="function">imagealphablending()</a></span>)
          </span>
         </dd>
        
        
         <dt><strong><code><a href="image.constants.php#constant.img-effect-normal">IMG_EFFECT_NORMAL</a></code></strong></dt>
         <dd>
          <span class="simpara">
           Same as <strong><code><a href="image.constants.php#constant.img-effect-alphablend">IMG_EFFECT_ALPHABLEND</a></code></strong>.
          </span>
         </dd>
        
        
         <dt><strong><code><a href="image.constants.php#constant.img-effect-overlay">IMG_EFFECT_OVERLAY</a></code></strong></dt>
         <dd>
          <span class="simpara">
           Overlay has the effect that black background pixels will remain
           black, white background pixels will remain white, but grey
           background pixels will take the colour of the foreground pixel.
          </span>
         </dd>
        
        
         <dt><strong><code><a href="image.constants.php#constant.img-effect-multiply">IMG_EFFECT_MULTIPLY</a></code></strong></dt>
         <dd>
          <span class="simpara">
           Overlays with a multiply effect.
          </span>
         </dd>
        
       </dl>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imagelayereffect-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imagelayereffect-changelog">
  <h3 class="title">Журнал змін</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версія</th>
      <th>Опис</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  Тепер <code class="parameter">image</code> має бути примірником
  <span class="classname"><a href="class.gdimage.php" class="classname">GdImage</a></span>. Раніше очікувався
  <code class="literal">gd</code>-<span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>.
 </td>
</tr>

     <tr>
      <td>7.2.0</td>
      <td>
       Added <strong><code><a href="image.constants.php#constant.img-effect-multiply">IMG_EFFECT_MULTIPLY</a></code></strong> (requires system libgd &gt;=
       2.1.1 or the bundled libgd).
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.imagelayereffect-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="example-1">
   <p><strong>Приклад #1 <span class="function"><strong>imagelayereffect()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Setup an image<br /></span><span style="color: #0000BB">$im </span><span style="color: #007700">= </span><span style="color: #0000BB">imagecreatetruecolor</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Set a background<br /></span><span style="color: #0000BB">imagefilledrectangle</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">imagecolorallocate</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">220</span><span style="color: #007700">, </span><span style="color: #0000BB">220</span><span style="color: #007700">, </span><span style="color: #0000BB">220</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">// Apply the overlay alpha blending flag<br /></span><span style="color: #0000BB">imagelayereffect</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">IMG_EFFECT_OVERLAY</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// Draw two grey ellipses<br /></span><span style="color: #0000BB">imagefilledellipse</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">40</span><span style="color: #007700">, </span><span style="color: #0000BB">40</span><span style="color: #007700">, </span><span style="color: #0000BB">imagecolorallocate</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">255</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">imagefilledellipse</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">80</span><span style="color: #007700">, </span><span style="color: #0000BB">imagecolorallocate</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">255</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">imagefilledellipse</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">80</span><span style="color: #007700">, </span><span style="color: #0000BB">50</span><span style="color: #007700">, </span><span style="color: #0000BB">imagecolorallocate</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">, </span><span style="color: #0000BB">255</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">, </span><span style="color: #0000BB">100</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">// Output<br /></span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type: image/png'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад виведе щось
схоже на:</p></div>
    <div class="mediaobject">
     
     <div class="imageobject">
      <img src="images/21009b70229598c6a80eef8b45bf282b-imagelayereffect.png" alt="Output of example : imagelayereffect()" width="100" height="100" />
     </div>
    </div>
  </div>
 </div>


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