uTools-Manuals/docs/php/imagepng.html
2019-04-08 23:22:26 +08:00

42 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>以 PNG 格式将图像输出到浏览器或文件</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.imagepng" class="refentry">
<div class="refnamediv">
<h1 class="refname">imagepng</h1>
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">imagepng</span> &mdash; <span class="dc-title">以 PNG 格式将图像输出到浏览器或文件</span></p>
</div>
<div class="refsect1 unknown-seealsp" id="refsect1-function.imagepng-unknown-seealsp">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>imagepng</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$image</code></span>
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>imagepng()</strong></span> 将 GD 图像流(<code class="parameter">image</code>)以
PNG 格式输出到标准输出(通常为浏览器),或者如果用
<code class="parameter">filename</code> 给出了文件名则将其输出到该文件。
<div class="informalexample">
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #DD0000">"test.png"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">$im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
<p class="para">
参见 <span class="function"><a href="imagegif.html" class="function">imagegif()</a></span><span class="function"><a href="imagewbmp.html" class="function">imagewbmp()</a></span><span class="function"><a href="imagejpeg.html" class="function">imagejpeg()</a></span>
<span class="function"><a href="imagetypes.html" class="function">imagetypes()</a></span>
</p>
</div>
</div></div></div></body></html>