<!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>Crop an image automatically using one of the available modes</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagecrop.html">imagecrop</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagedashedline.html">imagedashedline</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.imagecropauto" class="refentry"> <div class="refnamediv"> <h1 class="refname">imagecropauto</h1> <p class="verinfo">(PHP 5 >= 5.5.0)</p><p class="refpurpose"><span class="refname">imagecropauto</span> — <span class="dc-title">Crop an image automatically using one of the available modes</span></p> </div> <div class="refsect1 description" id="refsect1-function.imagecropauto-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">resource</span> <span class="methodname"><strong>imagecropauto</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">$mode</code><span class="initializer"> = -1</span></span> [, <span class="methodparam"><span class="type">float</span> <code class="parameter">$threshold</code><span class="initializer"> = .5</span></span> [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$color</code><span class="initializer"> = -1</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.imagecropauto-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">mode</code></em></span> <dd> <p class="para"> One of <strong><code>IMG_CROP_*</code></strong> constants. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">threshold</code></em></span> <dd> <p class="para"> Used in <strong><code>IMG_CROP_THRESHOLD</code></strong> mode. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">color</code></em></span> <dd> <p class="para"> Used in <strong><code>IMG_CROP_THRESHOLD</code></strong> mode. </p> </dd> </dt> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-function.imagecropauto-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Return cropped 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.imagecrop.html">imagecrop</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagedashedline.html">imagedashedline</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>