File: ref.image.html

package info (click to toggle)
php3 3%3A3.0.18-0potato1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 17,736 kB
  • ctags: 11,198
  • sloc: ansic: 108,120; sh: 2,512; php: 2,024; yacc: 1,887; makefile: 1,038; perl: 537; pascal: 238; awk: 90; cpp: 28; sql: 11
file content (513 lines) | stat: -rw-r--r-- 9,480 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
<HTML
><HEAD
><TITLE
>Image functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="manual.html"><LINK
REL="UP"
TITLE="Function Reference"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="icap_list_alarms"
HREF="function.icap-list-alarms.html"><LINK
REL="NEXT"
TITLE="GetImageSize"
HREF="function.getimagesize.html"><META
NAME="HTTP_EQUIV"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.icap-list-alarms.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.getimagesize.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.image"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>XXVIII. Image functions</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN14714"
></A
><P
>&#13;    You can use the image functions in PHP to get the size of
    <SPAN
CLASS="acronym"
>JPEG</SPAN
>, <SPAN
CLASS="acronym"
>GIF</SPAN
>,
    <SPAN
CLASS="acronym"
>PNG</SPAN
>, and <SPAN
CLASS="acronym"
>SWF</SPAN
> images, and if
    you have the <SPAN
CLASS="acronym"
>GD</SPAN
> library (available at <A
HREF="http://www.boutell.com/gd/"
TARGET="_top"
>http://www.boutell.com/gd/</A
>) you will also be able to create
    and manipulate images.
   </P
><P
>&#13;    The format of images you are able to manipulate depend on the
    version of gd you install, and any other libraries gd might need
    to access those image formats. Versions of gd older than gd-1.6
    support gif format images, and do not support png, where versions
    greater than gd-1.6 support png, not gif.
   </P
><P
>&#13;    In order to read and write images in jpeg format, you will need to
    obtain and install jpeg-6b (available at 
    <A
HREF="ftp://ftp.uu.net/graphics/jpeg/"
TARGET="_top"
>ftp://ftp.uu.net/graphics/jpeg/</A
>), and then recompile gd to
    make use of jpeg-6b. You will also have to compile PHP with 
    <TT
CLASS="option"
>--with-jpeg-dir=/path/to/jpeg-6b</TT
>.
   </P
><P
>&#13;    To add support for Type 1 fonts, you can install t1lib (available 
    at <A
HREF="ftp://ftp.neuroinformatik.ruhr-uni-bochum.de/pub/software/t1lib/"
TARGET="_top"
>ftp://ftp.neuroinformatik.ruhr-uni-bochum.de/pub/software/t1lib/</A
>), and then add 
    <TT
CLASS="option"
>--with-t1lib[=dir]</TT
>.
   </P
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="function.getimagesize.html"
>GetImageSize</A
> &#8212; Get the size of a GIF, JPEG, PNG or SWF image</DT
><DT
><A
HREF="function.imagearc.html"
>ImageArc</A
> &#8212; Draw a partial ellipse</DT
><DT
><A
HREF="function.imagechar.html"
>ImageChar</A
> &#8212; Draw a character horizontally</DT
><DT
><A
HREF="function.imagecharup.html"
>ImageCharUp</A
> &#8212; Draw a character vertically</DT
><DT
><A
HREF="function.imagecolorallocate.html"
>ImageColorAllocate</A
> &#8212; Allocate a color for an image</DT
><DT
><A
HREF="function.imagecolordeallocate.html"
>ImageColorDeAllocate</A
> &#8212; 
     De-allocate a color for an image
    </DT
><DT
><A
HREF="function.imagecolorat.html"
>ImageColorAt</A
> &#8212; Get the index of the color of a pixel</DT
><DT
><A
HREF="function.imagecolorclosest.html"
>ImageColorClosest</A
> &#8212; 
     Get the index of the closest color to the specified color
    </DT
><DT
><A
HREF="function.imagecolorexact.html"
>ImageColorExact</A
> &#8212; Get the index of the specified color</DT
><DT
><A
HREF="function.imagecolorresolve.html"
>ImageColorResolve</A
> &#8212; 
     Get the index of the specified color or its closest possible
     alternative
    </DT
><DT
><A
HREF="function.imagegammacorrect.html"
>ImageGammaCorrect</A
> &#8212; 
     Apply a gamma correction to a GD image
    </DT
><DT
><A
HREF="function.imagecolorset.html"
>ImageColorSet</A
> &#8212; 
     Set the color for the specified palette index
    </DT
><DT
><A
HREF="function.imagecolorsforindex.html"
>ImageColorsForIndex</A
> &#8212; Get the colors for an index</DT
><DT
><A
HREF="function.imagecolorstotal.html"
>ImageColorsTotal</A
> &#8212; 
     Find out the number of colors in an image's palette
    </DT
><DT
><A
HREF="function.imagecolortransparent.html"
>ImageColorTransparent</A
> &#8212; Define a color as transparent</DT
><DT
><A
HREF="function.imagecopy.html"
>ImageCopy</A
> &#8212; 
     Copy part of an image
    </DT
><DT
><A
HREF="function.imagecopyresized.html"
>ImageCopyResized</A
> &#8212; Copy and resize part of an image</DT
><DT
><A
HREF="function.imagecreate.html"
>ImageCreate</A
> &#8212; Create a new image</DT
><DT
><A
HREF="function.imagecreatefromgif.html"
>ImageCreateFromGIF</A
> &#8212; Create a new image from file or URL</DT
><DT
><A
HREF="function.imagecreatefromjpeg.html"
>ImageCreateFromJPEG</A
> &#8212; Create a new image from file or URL</DT
><DT
><A
HREF="function.imagecreatefrompng.html"
>ImageCreateFromPNG</A
> &#8212; Create a new image from file or URL</DT
><DT
><A
HREF="function.imagedashedline.html"
>ImageDashedLine</A
> &#8212; Draw a dashed line</DT
><DT
><A
HREF="function.imagedestroy.html"
>ImageDestroy</A
> &#8212; Destroy an image</DT
><DT
><A
HREF="function.imagefill.html"
>ImageFill</A
> &#8212; Flood fill</DT
><DT
><A
HREF="function.imagefilledpolygon.html"
>ImageFilledPolygon</A
> &#8212; Draw a filled polygon</DT
><DT
><A
HREF="function.imagefilledrectangle.html"
>ImageFilledRectangle</A
> &#8212; Draw a filled rectangle</DT
><DT
><A
HREF="function.imagefilltoborder.html"
>ImageFillToBorder</A
> &#8212; Flood fill to specific color</DT
><DT
><A
HREF="function.imagefontheight.html"
>ImageFontHeight</A
> &#8212; Get font height</DT
><DT
><A
HREF="function.imagefontwidth.html"
>ImageFontWidth</A
> &#8212; Get font width</DT
><DT
><A
HREF="function.imagegif.html"
>ImageGIF</A
> &#8212; Output image to browser or file</DT
><DT
><A
HREF="function.imagepng.html"
>ImagePNG</A
> &#8212; 
     Output a PNG image to either the browser or a file
    </DT
><DT
><A
HREF="function.imagejpeg.html"
>ImageJPEG</A
> &#8212; Output image to browser or file</DT
><DT
><A
HREF="function.imageinterlace.html"
>ImageInterlace</A
> &#8212; Enable or disable interlace</DT
><DT
><A
HREF="function.imageline.html"
>ImageLine</A
> &#8212; Draw a line</DT
><DT
><A
HREF="function.imageloadfont.html"
>ImageLoadFont</A
> &#8212; Load a new font</DT
><DT
><A
HREF="function.imagepolygon.html"
>ImagePolygon</A
> &#8212; Draw a polygon</DT
><DT
><A
HREF="function.imagepsbbox.html"
>ImagePSBBox</A
> &#8212; 
     Give the bounding box of a text rectangle using PostScript Type1
     fonts
    </DT
><DT
><A
HREF="function.imagepsencodefont.html"
>ImagePSEncodeFont</A
> &#8212; 
     Change the character encoding vector of a font
    </DT
><DT
><A
HREF="function.imagepsfreefont.html"
>ImagePSFreeFont</A
> &#8212; Free memory used by a PostScript Type 1 font</DT
><DT
><A
HREF="function.imagepsloadfont.html"
>ImagePSLoadFont</A
> &#8212; Load a PostScript Type 1 font from file</DT
><DT
><A
HREF="function.imagepsextendfont.html"
>ImagePsExtendFont</A
> &#8212; 
     Extend or condense a font
    </DT
><DT
><A
HREF="function.imagepsslantfont.html"
>ImagePsSlantFont</A
> &#8212; 
     Slant a font
    </DT
><DT
><A
HREF="function.imagepstext.html"
>ImagePSText</A
> &#8212; 
     To draw a text string over an image using PostScript Type1 fonts
    </DT
><DT
><A
HREF="function.imagerectangle.html"
>ImageRectangle</A
> &#8212; Draw a rectangle</DT
><DT
><A
HREF="function.imagesetpixel.html"
>ImageSetPixel</A
> &#8212; Set a single pixel</DT
><DT
><A
HREF="function.imagestring.html"
>ImageString</A
> &#8212; Draw a string horizontally</DT
><DT
><A
HREF="function.imagestringup.html"
>ImageStringUp</A
> &#8212; Draw a string vertically</DT
><DT
><A
HREF="function.imagesx.html"
>ImageSX</A
> &#8212; Get image width</DT
><DT
><A
HREF="function.imagesy.html"
>ImageSY</A
> &#8212; Get image height</DT
><DT
><A
HREF="function.imagettfbbox.html"
>ImageTTFBBox</A
> &#8212; 
     Give the bounding box of a text using TypeType fonts
    </DT
><DT
><A
HREF="function.imagettftext.html"
>ImageTTFText</A
> &#8212; 
     Write text to the image using TrueType fonts
    </DT
><DT
><A
HREF="function.imagetypes.html"
>ImageTypes</A
> &#8212; 
     Return the image types supported by this PHP build
    </DT
><DT
><A
HREF="function.read-exif-data.html"
>read_exif_data</A
> &#8212; Read the EXIF headers from a JPEG</DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.icap-list-alarms.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="manual.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.getimagesize.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>icap_list_alarms</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>GetImageSize</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>