Project

General

Profile

Statistics
| Branch: | Revision:

colonymech / docs / www / colonyscout / internal / fpdf16 / doc / image.htm @ f59acf11

History | View | Annotate | Download (2.84 KB)

1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5
<title>Image</title>
6
<link type="text/css" rel="stylesheet" href="../fpdf.css">
7
</head>
8
<body>
9
<h1>Image</h1>
10
<code>Image(<b>string</b> file [, <b>float</b> x [, <b>float</b> y [, <b>float</b> w [, <b>float</b> h [, <b>string</b> type [, <b>mixed</b> link]]]]]])</code>
11
<h2>Description</h2>
12
Puts an image. The size it will take on the page can be specified in different ways:
13
<ul>
14
<li>explicit width and height (expressed in user unit)</li>
15
<li>one explicit dimension, the other being calculated automatically in order to keep the original proportions</li>
16
<li>no explicit dimension, in which case the image is put at 72 dpi</li>
17
</ul>
18
Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
19
<br>
20
<br>
21
For JPEGs, all flavors are allowed:
22
<ul>
23
<li>gray scales</li>
24
<li>true colors (24 bits)</li>
25
<li>CMYK (32 bits)</li>
26
</ul>
27
For PNGs, are allowed:
28
<ul>
29
<li>gray scales on at most 8 bits (256 levels)</li>
30
<li>indexed colors</li>
31
<li>true colors (24 bits)</li>
32
</ul>
33
but are not supported:
34
<ul>
35
<li>Interlacing</li>
36
<li>Alpha channel</li>
37
</ul>
38
For GIFs: in case of an animated GIF, only the first frame is used.<br>
39
<br>
40
If a transparent color is defined, it is taken into account.<br>
41
<br>
42
The format can be specified explicitly or inferred from the file extension.<br>
43
It is possible to put a link on the image.<br>
44
<br>
45
Remark: if an image is used several times, only one copy is embedded in the file.
46
<h2>Parameters</h2>
47
<dl class="param">
48
<dt><code>file</code></dt>
49
<dd>
50
Path or URL of the image.
51
</dd>
52
<dt><code>x</code></dt>
53
<dd>
54
Abscissa of the upper-left corner. If not specified or equal to <code>null</code>, the current abscissa
55
is used.
56
</dd>
57
<dt><code>y</code></dt>
58
<dd>
59
Ordinate of the upper-left corner. If not specified or equal to <code>null</code>, the current ordinate
60
is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled)
61
and, after the call, the current ordinate is moved to the bottom of the image.
62
</dd>
63
<dt><code>w</code></dt>
64
<dd>
65
Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
66
</dd>
67
<dt><code>h</code></dt>
68
<dd>
69
Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
70
</dd>
71
<dt><code>type</code></dt>
72
<dd>
73
Image format. Possible values are (case insensitive): <code>JPG</code>, <code>JPEG</code>, <code>PNG</code> and <code>GIF</code>.
74
If not specified, the type is inferred from the file extension.
75
</dd>
76
<dt><code>link</code></dt>
77
<dd>
78
URL or identifier returned by AddLink().
79
</dd>
80
</dl>
81
<h2>See also</h2>
82
<a href="addlink.htm">AddLink()</a>.
83
<hr style="margin-top:1.5em">
84
<div style="text-align:center"><a href="index.htm">Index</a></div>
85
</body>
86
</html>