<?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.sigmoidalcontrastimage.php',
    1 => 'Imagick::sigmoidalContrastImage',
    2 => 'Adjusts the contrast of an image',
  ),
  'up' => 
  array (
    0 => 'class.imagick.php',
    1 => 'Imagick',
  ),
  'prev' => 
  array (
    0 => 'imagick.shearimage.php',
    1 => 'Imagick::shearImage',
  ),
  'next' => 
  array (
    0 => 'imagick.sketchimage.php',
    1 => 'Imagick::sketchImage',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imagick/imagick/sigmoidalcontrastimage.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="imagick.sigmoidalcontrastimage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::sigmoidalContrastImage</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::sigmoidalContrastImage</span> &mdash; <span class="dc-title">Adjusts the contrast of an image</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.sigmoidalcontrastimage-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::sigmoidalContrastImage</strong></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">$sharpen</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$alpha</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$beta</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">$channel</code><span class="initializer"> = Imagick::CHANNEL_DEFAULT</span></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Adjusts the contrast of an image with a non-linear sigmoidal contrast
   algorithm. Increase the contrast of the image using a sigmoidal transfer
   function without saturating highlights or shadows. Contrast indicates
   how much to increase the contrast (0 is none; 3 is typical; 20 is
   pushing it); mid-point indicates where midtones fall in the resultant
   image (0 is white; 50 is middle-gray; 100 is black). Set sharpen to
   <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> to increase the image contrast otherwise the contrast is reduced.
  </p>
  <p class="para">
   See also <a href="http://www.imagemagick.org/Usage/color_mods/#sigmoidal" class="link external">&raquo;&nbsp;ImageMagick
   v6 Examples - Image Transformations — Sigmoidal Non-linearity Contrast</a>
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.sigmoidalcontrastimage-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">sharpen</code></dt>
     <dd>
      <p class="para">
       If true increase the contrast, if false decrease the contrast.
      </p>
     </dd>
    
    
     <dt><code class="parameter">alpha</code></dt>
     <dd>
      <p class="para">
       The amount of contrast to apply. 1 is very little, 5 is a significant amount, 20 is extreme.
      </p>
     </dd>
    
    
     <dt><code class="parameter">beta</code></dt>
     <dd>
      <p class="para">
       Where the midpoint of the gradient will be. This value should be in the range 0 to 1 - mutliplied by the quantum value for ImageMagick.
      </p>
     </dd>
    
    
     <dt><code class="parameter">channel</code></dt>
     <dd>
      <p class="para">
       Which color channels the contrast will be applied to.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.sigmoidalcontrastimage-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.sigmoidalcontrastimage-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.sigmoidalcontrastimage-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 
     Create a gradient image using <span class="function"><strong>Imagick::sigmoidalContrastImage()</strong></span>
     suitable for blending two images together smoothly, with the blending
     defined by $contrast and $the midpoint
    </strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">function </span><span style="color: #0000BB">generateBlendImage</span><span style="color: #007700">(</span><span style="color: #0000BB">$width</span><span style="color: #007700">, </span><span style="color: #0000BB">$height</span><span style="color: #007700">, </span><span style="color: #0000BB">$contrast </span><span style="color: #007700">= </span><span style="color: #0000BB">10</span><span style="color: #007700">, </span><span style="color: #0000BB">$midpoint </span><span style="color: #007700">= </span><span style="color: #0000BB">0.5</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">$imagick </span><span style="color: #007700">= new </span><span style="color: #0000BB">Imagick</span><span style="color: #007700">();<br />    </span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">newPseudoImage</span><span style="color: #007700">(</span><span style="color: #0000BB">$width</span><span style="color: #007700">, </span><span style="color: #0000BB">$height</span><span style="color: #007700">, </span><span style="color: #DD0000">'gradient:black-white'</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$quanta </span><span style="color: #007700">= </span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getQuantumRange</span><span style="color: #007700">();<br />    </span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">sigmoidalContrastImage</span><span style="color: #007700">(</span><span style="color: #0000BB">true</span><span style="color: #007700">, </span><span style="color: #0000BB">$contrast</span><span style="color: #007700">, </span><span style="color: #0000BB">$midpoint </span><span style="color: #007700">* </span><span style="color: #0000BB">$quanta</span><span style="color: #007700">[</span><span style="color: #DD0000">"quantumRangeLong"</span><span style="color: #007700">]);<br /><br />    return </span><span style="color: #0000BB">$imagick</span><span style="color: #007700">; <br />}<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


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