function.imagegif.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 176 行 · 第 1/2 页

HTML
176
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Output image to browser or file</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.imagegd.html">imagegd</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.imagegrabscreen.html">imagegrabscreen</a></div> <div class="up"><a href="ref.image.html">GD Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.imagegif" class="refentry"> <div class="refnamediv">  <h1 class="refname">imagegif</h1>  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imagegif</span> &mdash; <span class="dc-title">Output image to browser or file</span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type">bool</span> <span class="methodname"><b><b>imagegif</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$image</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$filename</tt></span>  ] )</div>  <p class="para rdfs-comment">   <b>imagegif()</b> creates the <acronym title="Graphic Interchange Format">GIF</acronym>   file in filename from the image <i><tt class="parameter">image</tt></i>. The   <i><tt class="parameter">image</tt></i> argument is the return from the   <a href="function.imagecreate.html" class="function">imagecreate()</a> or <i>imagecreatefrom*</i>   function.  </p>  <p class="para">   The image format will be <acronym>GIF87a</acronym> unless the   image has been made transparent with   <a href="function.imagecolortransparent.html" class="function">imagecolortransparent()</a>, in which case the   image format will be <acronym>GIF89a</acronym>.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt><span class="term"><i><tt class="parameter">image</tt></i></span><dd><p class="para">An image resource, returned by one of the image creation functions, such as <a href="function.imagecreatetruecolor.html" class="function">imagecreatetruecolor()</a>.</p></dd></dt>    <dt>     <span class="term"><i><tt class="parameter">filename</tt></i></span>     <dd>      <p class="para">       The path to save the file to. If not set or <b><tt>NULL</tt></b>, the raw image stream       will be outputted directly.      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns <b><tt>TRUE</tt></b> on success or <b><tt>FALSE</tt></b> on failure.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 Outputting an image using <b>imagegif()</b></b></p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?