Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 7905

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Scales the size of an image</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.sampleimage.html">Imagick::sampleImage</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.segmentimage.html">Imagick::segmentImage</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="imagick.scaleimage" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::scaleImage</h1>
  <p class="verinfo">(PECL imagick 2.0.0)</p><p class="refpurpose"><span class="refname">Imagick::scaleImage</span> &mdash; <span class="dc-title">Scales the size of an image</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-imagick.scaleimage-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>Imagick::scaleImage</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$cols</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$rows</code></span>
   [, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$bestfit</code><span class="initializer"> = false</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Scales the size of an image to the given dimensions. The other parameter
   will be calculated if 0 is passed as either param.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
 <span class="simpara">
  The behavior of the parameter <em><code class="parameter">bestfit</code></em> changed in Imagick 3.0.0.
  Before this version given dimensions 400x400 an image of dimensions 200x150 would be
  left untouched. In Imagick 3.0.0 and later the image would be scaled up to size 400x300 as
  this is the &quot;best fit&quot; for the given dimensions. If <em><code class="parameter">bestfit</code></em>
  parameter is used both width and height must be given.
 </span>
</p></blockquote>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.scaleimage-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">cols</code></em></span>
     <dd>

      <p class="para">
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">rows</code></em></span>
     <dd>

      <p class="para">
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">bestfit</code></em></span>
     <dd>

      <p class="para">
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.scaleimage-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-imagick.scaleimage-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
   Throws ImagickException on error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-imagick.scaleimage-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>2.1.0</td>
       <td>
       Added optional fit parameter. This method now supports proportional scaling.
       Pass zero as either parameter for proportional scaling.  
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="imagick.sampleimage.html">Imagick::sampleImage</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="imagick.segmentimage.html">Imagick::segmentImage</a></div>
 <div class="up"><a href="class.imagick.html">Imagick</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>