<?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.setimageopacity.php',
    1 => 'Imagick::setImageOpacity',
    2 => 'Sets the image opacity level',
  ),
  'up' => 
  array (
    0 => 'class.imagick.php',
    1 => 'Imagick',
  ),
  'prev' => 
  array (
    0 => 'imagick.setimagemattecolor.php',
    1 => 'Imagick::setImageMatteColor',
  ),
  'next' => 
  array (
    0 => 'imagick.setimageorientation.php',
    1 => 'Imagick::setImageOrientation',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imagick/imagick/setimageopacity.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="imagick.setimageopacity" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::setImageOpacity</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::setImageOpacity</span> &mdash; <span class="dc-title">Sets the image opacity level</span></p>

 </div>

 <div id="imagick.setimageopacity-refsynopsisdiv">
   <div class="warning"><strong class="warning">Avviso</strong><p class="simpara">This function has been <em>DEPRECATED</em> as of Imagick 3.4.4. Relying on this function is highly discouraged.</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-imagick.setimageopacity-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::setImageOpacity</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$opacity</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>


  <p class="para rdfs-comment">
   Sets the image to the specified opacity level. Questo metodo è disponibile se Imagick è stato compilato con ImageMagick versione 6.3.1 o successive.
   This method operates on all channels, which means that for example opacity value
   of 0.5 will set all transparent areas to partially opaque. To add transparency to
   areas that are not already transparent use <a href="imagick.evaluateimage.php" class="link">Imagick::evaluateImage()</a>
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.setimageopacity-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">opacity</code></dt>
     <dd>
      <p class="para">
       The level of transparency: 1.0 is fully opaque and 0.0 is fully
       transparent.
      </p>
     </dd>
    
   </dl>
  </p>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-imagick.setimageopacity-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 examples" id="refsect1-imagick.setimageopacity-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 A <span class="function"><strong>Imagick::setImageOpacity()</strong></span> example</strong></p>
    <div class="example-contents"><p>
     An example of using Imagick::setImageOpacity()
    </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 the object */<br /></span><span style="color: #0000BB">$image </span><span style="color: #007700">= new </span><span style="color: #0000BB">Imagick</span><span style="color: #007700">(</span><span style="color: #DD0000">'source.png'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* Set the opacity */<br /></span><span style="color: #0000BB">$image</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setImageOpacity</span><span style="color: #007700">(</span><span style="color: #0000BB">0.7</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* output the image */<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 />echo </span><span style="color: #0000BB">$image</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


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