<?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.modulateimage.php', 1 => 'Imagick::modulateImage', 2 => 'Control the brightness, saturation, and hue', ), 'up' => array ( 0 => 'class.imagick.php', 1 => 'Imagick', ), 'prev' => array ( 0 => 'imagick.minifyimage.php', 1 => 'Imagick::minifyImage', ), 'next' => array ( 0 => 'imagick.montageimage.php', 1 => 'Imagick::montageImage', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/imagick/imagick/modulateimage.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?> <div id="imagick.modulateimage" class="refentry"> <div class="refnamediv"> <h1 class="refname">Imagick::modulateImage</h1> <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::modulateImage</span> — <span class="dc-title">Control the brightness, saturation, and hue</span></p> </div> <div class="refsect1 description" id="refsect1-imagick.modulateimage-description"> <h3 class="title">Descrizione</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><strong>Imagick::modulateImage</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$brightness</code></span>, <span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$saturation</code></span>, <span class="methodparam"><span class="type"><a href="language.types.float.php" class="type float">float</a></span> <code class="parameter">$hue</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div> <p class="para rdfs-comment"> Lets you control the brightness, saturation, and hue of an image. Hue is the percentage of absolute rotation from the current position. For example 50 results in a counter-clockwise rotation of 90 degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200 both resulting in a rotation of 180 degrees. </p> </div> <div class="refsect1 parameters" id="refsect1-imagick.modulateimage-parameters"> <h3 class="title">Elenco dei parametri</h3> <p class="para"> <dl> <dt><code class="parameter">brightness</code></dt> <dd> <p class="para"> </p> </dd> <dt><code class="parameter">saturation</code></dt> <dd> <p class="para"> </p> </dd> <dt><code class="parameter">hue</code></dt> <dd> <p class="para"> </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-imagick.modulateimage-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.modulateimage-examples"> <h3 class="title">Esempi</h3> <p class="para"> <div class="example" id="example-2868"> <p><strong>Example #1 <span class="function"><strong>Imagick::modulateImage()</strong></span></strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">modulateImage</span><span style="color: #007700">(</span><span style="color: #0000BB">$imagePath</span><span style="color: #007700">, </span><span style="color: #0000BB">$hue</span><span style="color: #007700">, </span><span style="color: #0000BB">$brightness</span><span style="color: #007700">, </span><span style="color: #0000BB">$saturation</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">(</span><span style="color: #0000BB">realpath</span><span style="color: #007700">(</span><span style="color: #0000BB">$imagePath</span><span style="color: #007700">));<br /> </span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-></span><span style="color: #0000BB">modulateImage</span><span style="color: #007700">(</span><span style="color: #0000BB">$brightness</span><span style="color: #007700">, </span><span style="color: #0000BB">$saturation</span><span style="color: #007700">, </span><span style="color: #0000BB">$hue</span><span style="color: #007700">);<br /> </span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-Type: image/jpg"</span><span style="color: #007700">);<br /> echo </span><span style="color: #0000BB">$imagick</span><span style="color: #007700">-></span><span style="color: #0000BB">getImageBlob</span><span style="color: #007700">();<br />}<br /><br /></span><span style="color: #0000BB">?></span></span></code></div> </div> </div> </p> </div> </div><?php manual_footer($setup); ?>