mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
195 lines
5.5 KiB
HTML
195 lines
5.5 KiB
HTML
<!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>Reads an image for later placement</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><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)</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" id="refsect1-function.ps-open-image-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>ps_open_image</strong></span>
|
|
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$psdoc</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$type</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$source</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$lenght</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$width</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$height</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$components</code></span>
|
|
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$bpc</code></span>
|
|
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$params</code></span>
|
|
) : <span class="type">int</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Reads an image which is already available in memory. The parameter
|
|
<code class="parameter">source</code> is currently not evaluated and assumed to be
|
|
<em>memory</em>. 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 <code class="parameter">components</code> color components, and each
|
|
component has <code class="parameter">bpc</code> bits.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.ps-open-image-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">psdoc</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
Resource identifier of the postscript file
|
|
as returned by <span class="function"><a href="ps_new.html" class="function">ps_new()</a></span>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">type</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The type of the image. Possible values are <em>png</em>,
|
|
<em>jpeg</em>, or <em>eps</em>.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">source</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
Not used.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">data</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The image data.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">length</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The length of the image data.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">width</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The width of the image.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">height</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The height of the image.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">components</code></dt>
|
|
|
|
<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>
|
|
<code class="parameter">bpc</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
Number of bits per component (quite often 8).
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">params</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.ps-open-image-returnvalues">
|
|
<h3 class="title">返回值</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" id="refsect1-function.ps-open-image-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="ps_open_image_file.html" class="function" rel="rdfs-seeAlso">ps_open_image_file()</a> - Opens image from file</span></li>
|
|
<li class="member"><span class="function"><a href="ps_place_image.html" class="function" rel="rdfs-seeAlso">ps_place_image()</a> - Places image on the page</span></li>
|
|
<li class="member"><span class="function"><a href="ps_close_image.html" class="function" rel="rdfs-seeAlso">ps_close_image()</a> - Closes image and frees memory</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |