<!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>Scale an image using the given new width and height</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagesavealpha.html">imagesavealpha</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagesetbrush.html">imagesetbrush</a></div> <div class="up"><a href="ref.image.html">GD and Image Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.imagescale" class="refentry"> <div class="refnamediv"> <h1 class="refname">imagescale</h1> <p class="verinfo">(PHP 5 >= 5.5.0)</p><p class="refpurpose"><span class="refname">imagescale</span> — <span class="dc-title">Scale an image using the given new width and height</span></p> </div> <div class="refsect1 description" id="refsect1-function.imagescale-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">resource</span> <span class="methodname"><strong>imagescale</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$image</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$new_width</code></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$new_height</code><span class="initializer"> = -1</span></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code><span class="initializer"> = IMG_BILINEAR_FIXED</span></span> ]] )</div> <p class="para rdfs-comment"> </p> <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is currently not documented; only its argument list is available. </p></div> </div> <div class="refsect1 parameters" id="refsect1-function.imagescale-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <span class="term"><em><code class="parameter"> image</code></em></span><dd> <p class="para">An image resource, returned by one of the image creation functions, such as <span class="function"><a href="function.imagecreatetruecolor.html" class="function">imagecreatetruecolor()</a></span>.</p></dd> </dt> <dt> <span class="term"><em><code class="parameter">new_width</code></em></span> <dd> <p class="para"> </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">new_height</code></em></span> <dd> <p class="para"> </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">mode</code></em></span> <dd> <p class="para"> One of <strong><code>IMG_NEAREST_NEIGHBOUR</code></strong>, <strong><code>IMG_BILINEAR_FIXED</code></strong>, <strong><code>IMG_BICUBIC</code></strong>, <strong><code>IMG_BICUBIC_FIXED</code></strong> or anything else (will use two pass). </p> </dd> </dt> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-function.imagescale-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Return scaled image resource on success or <strong><code>FALSE</code></strong> on failure. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagesavealpha.html">imagesavealpha</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagesetbrush.html">imagesetbrush</a></div> <div class="up"><a href="ref.image.html">GD and Image Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>