📄 function.ps-open-image.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Reads an image for later placement</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.ps-open-image-file.html">ps_open_image_file</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-open-memory-image.html">ps_open_memory_image</a></div> <div class="up"><a href="ref.ps.html">PS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.ps-open-image" class="refentry"> <div class="refnamediv"> <h1 class="refname">ps_open_image</h1> <p class="verinfo">(PECL ps:1.1.0-1.3.5)</p><p class="refpurpose"><span class="refname">ps_open_image</span> — <span class="dc-title">Reads an image for later placement</span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">int</span> <span class="methodname"><b><b>ps_open_image</b></b></span> ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$psdoc</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$type</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$source</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$data</tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$lenght</tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$width</tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$height</tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$components</tt></span> , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$bpc</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$params</tt></span> )</div> <p class="para rdfs-comment"> Reads an image which is already available in memory. The parameter <i><tt class="parameter">source</tt></i> is currently not evaluated and assumed to be <i>memory</i>. The image data is a sequence of pixels starting in th upper left corner and ending in the lower right corner. Each pixel consists of <i><tt class="parameter">components</tt></i> color components, and each component has <i><tt class="parameter">bpc</tt></i> bits. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">psdoc</tt></i></span> <dd> <p class="para"> Resource identifier of the postscript file as returned by <a href="function.ps-new.html" class="function">ps_new()</a>. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">type</tt></i></span> <dd> <p class="para"> The type of the image. Possible values are <i>png</i>, <i>jpeg</i>, or <i>eps</i>. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">source</tt></i></span> <dd> <p class="para"> Not used. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">data</tt></i></span> <dd> <p class="para"> The image data. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">length</tt></i></span> <dd> <p class="para"> The length of the image data. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">width</tt></i></span> <dd> <p class="para"> The width of the image. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">height</tt></i></span> <dd> <p class="para"> The height of the image. </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">components</tt></i></span> <dd> <p class="para"> The number of components for each pixel. This can be 1 (gray scale images), 3 (rgb images), or 4 (cmyk, rgba images). </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">bpc</tt></i></span> <dd> <p class="para"> Number of bits per component (quite often 8). </p> </dd> </dt> <dt> <span class="term"><i><tt class="parameter">params</tt></i></span> <dd> <p class="para"> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns identifier of image or zero in case of an error. The identifier is a positive number greater than 0. </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.ps-open-image-file.html" class="function" rel="rdfs-seeAlso">ps_open_image_file()</a></li> <li class="member"><a href="function.ps-place-image.html" class="function" rel="rdfs-seeAlso">ps_place_image()</a></li> <li class="member"><a href="function.ps-close-image.html" class="function" rel="rdfs-seeAlso">ps_close_image()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.ps-open-image-file.html">ps_open_image_file</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.ps-open-memory-image.html">ps_open_memory_image</a></div> <div class="up"><a href="ref.ps.html">PS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -