File: gd.php

package info (click to toggle)
codelite 12.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 95,112 kB
  • sloc: cpp: 424,040; ansic: 18,284; php: 9,569; lex: 4,186; yacc: 2,820; python: 2,294; sh: 312; makefile: 51; xml: 13
file content (2652 lines) | stat: -rw-r--r-- 81,364 bytes parent folder | download | duplicates (6)
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
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
<?php

// Start of gd v.

/**
 * Retrieve information about the currently installed GD library
 * @link http://www.php.net/manual/en/function.gd-info.php
 * @return array an associative array.
 *  </p>
 *  <p>
 *   <table>
 *    Elements of array returned by gd_info
 *    
 *     
 *      <tr valign="top">
 *       <td>Attribute</td>
 *       <td>Meaning</td>
 *      </tr>
 *     
 *     
 *      <tr valign="top">
 *       <td>GD Version</td>
 *       <td>string value describing the installed
 *        libgd version.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>FreeType Support</td>
 *       <td>boolean value.  true
 *        if FreeType Support is installed.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>FreeType Linkage</td>
 *       <td>string value describing the way in which
 *        FreeType was linked. Expected values are: 'with freetype',
 *        'with TTF library', and 'with unknown library'.  This element will
 *        only be defined if FreeType Support evaluated to
 *        true.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>T1Lib Support</td>
 *       <td>boolean value.  true
 *        if T1Lib support is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>GIF Read Support</td>
 *       <td>boolean value.  true
 *        if support for reading GIF
 *        images is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>GIF Create Support</td>
 *       <td>boolean value.  true
 *        if support for creating GIF
 *        images is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>JPEG Support</td>
 *       <td>boolean value.  true
 *        if JPEG support is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>PNG Support</td>
 *       <td>boolean value.  true
 *        if PNG support is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>WBMP Support</td>
 *       <td>boolean value.  true
 *        if WBMP support is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>XBM Support</td>
 *       <td>boolean value.  true
 *        if XBM support is included.</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>WebP Support</td>
 *       <td>boolean value.  true
 *        if WebP support is included.</td>
 *      </tr>
 *     
 *    
 *   </table>
 *  </p>
 *  
 *   <p>
 *    Previous to PHP 5.3.0, the JPEG Support attribute was named
 *    JPG Support.
 */
function gd_info () {}

/**
 * Draws an arc
 * @link http://www.php.net/manual/en/function.imagearc.php
 * @param image resource 
 * @param cx int <p>
 *       x-coordinate of the center.
 *      </p>
 * @param cy int <p>
 *       y-coordinate of the center.
 *      </p>
 * @param width int <p>
 *       The arc width.
 *      </p>
 * @param height int <p>
 *       The arc height.
 *      </p>
 * @param start int <p>
 *       The arc start angle, in degrees.
 *      </p>
 * @param end int <p>
 *       The arc end angle, in degrees.
 *       0° is located at the three-o'clock position, and the arc is drawn
 *       clockwise.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagearc ($image, $cx, $cy, $width, $height, $start, $end, $color) {}

/**
 * Draw an ellipse
 * @link http://www.php.net/manual/en/function.imageellipse.php
 * @param image resource 
 * @param cx int <p>
 *       x-coordinate of the center.
 *      </p>
 * @param cy int <p>
 *       y-coordinate of the center.
 *      </p>
 * @param width int <p>
 *       The ellipse width.
 *      </p>
 * @param height int <p>
 *       The ellipse height.
 *      </p>
 * @param color int <p>
 *       The color of the ellipse. A color identifier created with
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imageellipse ($image, $cx, $cy, $width, $height, $color) {}

/**
 * Draw a character horizontally
 * @link http://www.php.net/manual/en/function.imagechar.php
 * @param image resource 
 * @param font int 
 * @param x int <p>
 *       x-coordinate of the start.
 *      </p>
 * @param y int <p>
 *       y-coordinate of the start.
 *      </p>
 * @param c string <p>
 *       The character to draw.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagechar ($image, $font, $x, $y, $c, $color) {}

/**
 * Draw a character vertically
 * @link http://www.php.net/manual/en/function.imagecharup.php
 * @param image resource 
 * @param font int 
 * @param x int <p>
 *       x-coordinate of the start.
 *      </p>
 * @param y int <p>
 *       y-coordinate of the start.
 *      </p>
 * @param c string <p>
 *       The character to draw.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagecharup ($image, $font, $x, $y, $c, $color) {}

/**
 * Get the index of the color of a pixel
 * @link http://www.php.net/manual/en/function.imagecolorat.php
 * @param image resource 
 * @param x int <p>
 *       x-coordinate of the point.
 *      </p>
 * @param y int <p>
 *       y-coordinate of the point.
 *      </p>
 * @return int the index of the color.
 */
function imagecolorat ($image, $x, $y) {}

/**
 * Allocate a color for an image
 * @link http://www.php.net/manual/en/function.imagecolorallocate.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @return int A color identifier or false if the allocation failed.
 */
function imagecolorallocate ($image, $red, $green, $blue) {}

/**
 * Copy the palette from one image to another
 * @link http://www.php.net/manual/en/function.imagepalettecopy.php
 * @param destination resource <p>
 *       The destination image resource.
 *      </p>
 * @param source resource <p>
 *       The source image resource.
 *      </p>
 * @return void 
 */
function imagepalettecopy ($destination, $source) {}

/**
 * Create a new image from the image stream in the string
 * @link http://www.php.net/manual/en/function.imagecreatefromstring.php
 * @param image string <p>
 *       A string containing the image data.
 *      </p>
 * @return resource An image resource will be returned on success. false is returned if
 *   the image type is unsupported, the data is not in a recognised format,
 *   or the image is corrupt and cannot be loaded.
 */
function imagecreatefromstring ($image) {}

/**
 * Get the index of the closest color to the specified color
 * @link http://www.php.net/manual/en/function.imagecolorclosest.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @return int the index of the closest color, in the palette of the image, to
 *   the specified one
 */
function imagecolorclosest ($image, $red, $green, $blue) {}

/**
 * Get the index of the color which has the hue, white and blackness
 * @link http://www.php.net/manual/en/function.imagecolorclosesthwb.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @return int an integer with the index of the color which has 
 *   the hue, white and blackness nearest the given color.
 */
function imagecolorclosesthwb ($image, $red, $green, $blue) {}

/**
 * De-allocate a color for an image
 * @link http://www.php.net/manual/en/function.imagecolordeallocate.php
 * @param image resource 
 * @param color int <p>
 *       The color identifier.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagecolordeallocate ($image, $color) {}

/**
 * Get the index of the specified color or its closest possible alternative
 * @link http://www.php.net/manual/en/function.imagecolorresolve.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @return int a color index.
 */
function imagecolorresolve ($image, $red, $green, $blue) {}

/**
 * Get the index of the specified color
 * @link http://www.php.net/manual/en/function.imagecolorexact.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @return int the index of the specified color in the palette, or -1 if the
 *   color does not exist.
 */
function imagecolorexact ($image, $red, $green, $blue) {}

/**
 * Set the color for the specified palette index
 * @link http://www.php.net/manual/en/function.imagecolorset.php
 * @param image resource 
 * @param index int <p>
 *       An index in the palette.
 *      </p>
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @param alpha int[optional] <p>
 *       Value of alpha component.
 *      </p>
 * @return void 
 */
function imagecolorset ($image, $index, $red, $green, $blue, $alpha = null) {}

/**
 * Define a color as transparent
 * @link http://www.php.net/manual/en/function.imagecolortransparent.php
 * @param image resource 
 * @param color int[optional] <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return int The identifier of the new (or current, if none is specified)
 *   transparent color is returned. If color
 *   is not specified, and the image has no transparent color, the
 *   returned identifier will be -1.
 */
function imagecolortransparent ($image, $color = null) {}

/**
 * Find out the number of colors in an image's palette
 * @link http://www.php.net/manual/en/function.imagecolorstotal.php
 * @param image resource <p>
 *       An image resource, returned by one of the image creation functions, such
 *       as imagecreatefromgif.
 *      </p>
 * @return int the number of colors in the specified image's palette or 0 for
 *   truecolor images.
 */
function imagecolorstotal ($image) {}

/**
 * Get the colors for an index
 * @link http://www.php.net/manual/en/function.imagecolorsforindex.php
 * @param image resource 
 * @param index int <p>
 *       The color index.
 *      </p>
 * @return array an associative array with red, green, blue and alpha keys that
 *   contain the appropriate values for the specified color index.
 */
function imagecolorsforindex ($image, $index) {}

/**
 * Copy part of an image
 * @link http://www.php.net/manual/en/function.imagecopy.php
 * @param dst_im resource <p>&gd.image.destination;</p>
 * @param src_im resource <p>&gd.image.source;</p>
 * @param dst_x int <p>
 *       x-coordinate of destination point.
 *      </p>
 * @param dst_y int <p>
 *       y-coordinate of destination point.
 *      </p>
 * @param src_x int <p>
 *       x-coordinate of source point.
 *      </p>
 * @param src_y int <p>
 *       y-coordinate of source point.
 *      </p>
 * @param src_w int <p>&gd.source.width;</p>
 * @param src_h int <p>&gd.source.height;</p>
 * @return bool Returns true on success, false on failure.
 */
function imagecopy ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h) {}

/**
 * Copy and merge part of an image
 * @link http://www.php.net/manual/en/function.imagecopymerge.php
 * @param dst_im resource <p>&gd.image.destination;</p>
 * @param src_im resource <p>&gd.image.source;</p>
 * @param dst_x int <p>
 *       x-coordinate of destination point.
 *      </p>
 * @param dst_y int <p>
 *       y-coordinate of destination point.
 *      </p>
 * @param src_x int <p>
 *       x-coordinate of source point.
 *      </p>
 * @param src_y int <p>
 *       y-coordinate of source point.
 *      </p>
 * @param src_w int <p>&gd.source.width;</p>
 * @param src_h int <p>&gd.source.height;</p>
 * @param pct int <p>
 *       The two images will be merged according to pct
 *       which can range from 0 to 100.  When pct = 0,
 *       no action is taken, when 100 this function behaves identically
 *       to imagecopy for pallete images, except for
 *       ignoring alpha components, while it implements alpha transparency
 *       for true colour images.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagecopymerge ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) {}

/**
 * Copy and merge part of an image with gray scale
 * @link http://www.php.net/manual/en/function.imagecopymergegray.php
 * @param dst_im resource <p>&gd.image.destination;</p>
 * @param src_im resource <p>&gd.image.source;</p>
 * @param dst_x int <p>
 *       x-coordinate of destination point.
 *      </p>
 * @param dst_y int <p>
 *       y-coordinate of destination point.
 *      </p>
 * @param src_x int <p>
 *       x-coordinate of source point.
 *      </p>
 * @param src_y int <p>
 *       y-coordinate of source point.
 *      </p>
 * @param src_w int <p>&gd.source.width;</p>
 * @param src_h int <p>&gd.source.height;</p>
 * @param pct int <p>
 *        The src_im will be changed to grayscale according 
 *        to pct where 0 is fully grayscale and 100 is 
 *        unchanged. When pct = 100 this function behaves 
 *        identically to imagecopy for pallete images, except for
 *        ignoring alpha components, while
 *        it implements alpha transparency for true colour images.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagecopymergegray ($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $src_w, $src_h, $pct) {}

/**
 * Copy and resize part of an image
 * @link http://www.php.net/manual/en/function.imagecopyresized.php
 * @param dst_image resource <p>&gd.image.destination;</p>
 * @param src_image resource <p>&gd.image.source;</p>
 * @param dst_x int <p>
 *       x-coordinate of destination point.
 *      </p>
 * @param dst_y int <p>
 *       y-coordinate of destination point.
 *      </p>
 * @param src_x int <p>
 *       x-coordinate of source point.
 *      </p>
 * @param src_y int <p>
 *       y-coordinate of source point.
 *      </p>
 * @param dst_w int <p>
 *       Destination width.
 *      </p>
 * @param dst_h int <p>
 *       Destination height.
 *      </p>
 * @param src_w int <p>&gd.source.width;</p>
 * @param src_h int <p>&gd.source.height;</p>
 * @return bool Returns true on success, false on failure.
 */
function imagecopyresized ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {}

/**
 * Create a new palette based image
 * @link http://www.php.net/manual/en/function.imagecreate.php
 * @param width int <p>
 *       The image width.
 *      </p>
 * @param height int <p>
 *       The image height.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreate ($width, $height) {}

/**
 * Create a new true color image
 * @link http://www.php.net/manual/en/function.imagecreatetruecolor.php
 * @param width int <p>
 *       Image width.
 *      </p>
 * @param height int <p>
 *       Image height.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatetruecolor ($width, $height) {}

/**
 * Finds whether an image is a truecolor image
 * @link http://www.php.net/manual/en/function.imageistruecolor.php
 * @param image resource 
 * @return bool true if the image is truecolor, false
 *   otherwise.
 */
function imageistruecolor ($image) {}

/**
 * Convert a true color image to a palette image
 * @link http://www.php.net/manual/en/function.imagetruecolortopalette.php
 * @param image resource 
 * @param dither bool <p>
 *       Indicates if the image should be dithered - if it is true then
 *       dithering will be used which will result in a more speckled image but
 *       with better color approximation.
 *      </p>
 * @param ncolors int <p>
 *       Sets the maximum number of colors that should be retained in the palette.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagetruecolortopalette ($image, $dither, $ncolors) {}

/**
 * Converts a palette based image to true color
 * @link http://www.php.net/manual/en/function.imagepalettetotruecolor.php
 * @param src resource 
 * @return bool true if the convertion was complete, or if the source image already 
 *   is a true color image, otherwise false is returned.
 */
function imagepalettetotruecolor ($src) {}

/**
 * Set the thickness for line drawing
 * @link http://www.php.net/manual/en/function.imagesetthickness.php
 * @param image resource 
 * @param thickness int <p>
 *       Thickness, in pixels.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagesetthickness ($image, $thickness) {}

/**
 * Draw a partial arc and fill it
 * @link http://www.php.net/manual/en/function.imagefilledarc.php
 * @param image resource 
 * @param cx int <p>
 *       x-coordinate of the center.
 *      </p>
 * @param cy int <p>
 *       y-coordinate of the center.
 *      </p>
 * @param width int <p>
 *       The arc width.
 *      </p>
 * @param height int <p>
 *       The arc height.
 *      </p>
 * @param start int <p>
 *       The arc start angle, in degrees.
 *      </p>
 * @param end int <p>
 *       The arc end angle, in degrees.
 *       0° is located at the three-o'clock position, and the arc is drawn
 *       clockwise.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @param style int <p>
 *       A bitwise OR of the following possibilities:
 *       
 *        IMG_ARC_PIE
 * @return bool Returns true on success, false on failure.
 */
function imagefilledarc ($image, $cx, $cy, $width, $height, $start, $end, $color, $style) {}

/**
 * Draw a filled ellipse
 * @link http://www.php.net/manual/en/function.imagefilledellipse.php
 * @param image resource 
 * @param cx int <p>
 *       x-coordinate of the center.
 *      </p>
 * @param cy int <p>
 *       y-coordinate of the center.
 *      </p>
 * @param width int <p>
 *       The ellipse width.
 *      </p>
 * @param height int <p>
 *       The ellipse height.
 *      </p>
 * @param color int <p>
 *       The fill color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagefilledellipse ($image, $cx, $cy, $width, $height, $color) {}

/**
 * Set the blending mode for an image
 * @link http://www.php.net/manual/en/function.imagealphablending.php
 * @param image resource 
 * @param blendmode bool <p>
 *       Whether to enable the blending mode or not. On true color images 
 *       the default value is true otherwise the default value is false
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagealphablending ($image, $blendmode) {}

/**
 * Set the flag to save full alpha channel information (as opposed to single-color transparency) when saving PNG images
 * @link http://www.php.net/manual/en/function.imagesavealpha.php
 * @param image resource 
 * @param saveflag bool <p>
 *       Whether to save the alpha channel or not. Default to false. 
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagesavealpha ($image, $saveflag) {}

/**
 * Allocate a color for an image
 * @link http://www.php.net/manual/en/function.imagecolorallocatealpha.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @param alpha int <p>
 *       A value between 0 and 127.
 *       0 indicates completely opaque while 
 *       127 indicates completely transparent.
 *      </p>
 * @return int A color identifier or false if the allocation failed.
 */
function imagecolorallocatealpha ($image, $red, $green, $blue, $alpha) {}

/**
 * Get the index of the specified color + alpha or its closest possible alternative
 * @link http://www.php.net/manual/en/function.imagecolorresolvealpha.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @param alpha int <p>
 *       A value between 0 and 127.
 *       0 indicates completely opaque while 
 *       127 indicates completely transparent.
 *      </p>
 * @return int a color index.
 */
function imagecolorresolvealpha ($image, $red, $green, $blue, $alpha) {}

/**
 * Get the index of the closest color to the specified color + alpha
 * @link http://www.php.net/manual/en/function.imagecolorclosestalpha.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @param alpha int <p>
 *       A value between 0 and 127.
 *       0 indicates completely opaque while 
 *       127 indicates completely transparent.
 *      </p>
 * @return int the index of the closest color in the palette.
 */
function imagecolorclosestalpha ($image, $red, $green, $blue, $alpha) {}

/**
 * Get the index of the specified color + alpha
 * @link http://www.php.net/manual/en/function.imagecolorexactalpha.php
 * @param image resource 
 * @param red int <p>&gd.value.red;</p>
 * @param green int <p>&gd.value.green;</p>
 * @param blue int <p>&gd.value.blue;</p>
 * @param alpha int <p>
 *       A value between 0 and 127.
 *       0 indicates completely opaque while 
 *       127 indicates completely transparent.
 *      </p>
 * @return int the index of the specified color+alpha in the palette of the
 *   image, or -1 if the color does not exist in the image's palette.
 */
function imagecolorexactalpha ($image, $red, $green, $blue, $alpha) {}

/**
 * Copy and resize part of an image with resampling
 * @link http://www.php.net/manual/en/function.imagecopyresampled.php
 * @param dst_image resource <p>&gd.image.destination;</p>
 * @param src_image resource <p>&gd.image.source;</p>
 * @param dst_x int <p>
 *       x-coordinate of destination point.
 *      </p>
 * @param dst_y int <p>
 *       y-coordinate of destination point.
 *      </p>
 * @param src_x int <p>
 *       x-coordinate of source point.
 *      </p>
 * @param src_y int <p>
 *       y-coordinate of source point.
 *      </p>
 * @param dst_w int <p>
 *       Destination width.
 *      </p>
 * @param dst_h int <p>
 *       Destination height.
 *      </p>
 * @param src_w int <p>&gd.source.width;</p>
 * @param src_h int <p>&gd.source.height;</p>
 * @return bool Returns true on success, false on failure.
 */
function imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h) {}

/**
 * Rotate an image with a given angle
 * @link http://www.php.net/manual/en/function.imagerotate.php
 * @param image resource 
 * @param angle float <p>
 *       Rotation angle, in degrees. The rotation angle is interpreted as the
 *       number of degrees to rotate the image anticlockwise.
 *      </p>
 * @param bgd_color int <p>
 *       Specifies the color of the uncovered zone after the rotation
 *      </p>
 * @param ignore_transparent int[optional] <p>
 *       If set and non-zero, transparent colors are ignored (otherwise kept).
 *      </p>
 * @return resource an image resource for the rotated image, &return.falseforfailure;.
 */
function imagerotate ($image, $angle, $bgd_color, $ignore_transparent = null) {}

/**
 * Flips an image using a given mode
 * @link http://www.php.net/manual/en/function.imageflip.php
 * @param image resource 
 * @param mode int <p>
 *       Flip mode, this can be one of the IMG_FLIP_* constants:
 *      </p>
 *      <p>
 *       
 *        
 *         
 *          <tr valign="top">
 *           <td>Constant</td>
 *           <td>Meaning</td>
 *          </tr>
 *         
 *         
 *          <tr valign="top">
 *           <td>IMG_FLIP_HORIZONTAL</td>
 *           <td>
 *            Flips the image horizontally.
 *           </td>
 *          </tr>
 *          <tr valign="top">
 *           <td>IMG_FLIP_VERTICAL</td>
 *           <td>
 *            Flips the image vertically.
 *           </td>
 *          </tr>
 *          <tr valign="top">
 *           <td>IMG_FLIP_BOTH</td>
 *           <td>
 *            Flips the image both horizontally and vertically.
 *           </td>
 *          </tr>
 *         
 *        
 *       
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imageflip ($image, $mode) {}

/**
 * Should antialias functions be used or not
 * @link http://www.php.net/manual/en/function.imageantialias.php
 * @param image resource 
 * @param enabled bool <p>
 *       Whether to enable antialiasing or not.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imageantialias ($image, $enabled) {}

/**
 * Crop an image using the given coordinates and size, x, y, width and height
 * @link http://www.php.net/manual/en/function.imagecrop.php
 * @param image resource 
 * @param rect array <p>
 *      Array with keys "x", "y", "width" and "height".
 *     </p>
 * @return resource Return cropped image resource on success&return.falseforfailure;.
 */
function imagecrop ($image, array $rect) {}

/**
 * Crop an image automatically using one of the available modes
 * @link http://www.php.net/manual/en/function.imagecropauto.php
 * @param image resource 
 * @param mode int[optional] <p>
 *      One of IMG_CROP_* constants.
 *     </p>
 * @param threshold float[optional] <p>
 *      Used in IMG_CROP_THRESHOLD mode.
 *     </p>
 * @param color int[optional] <p>
 *      Used in IMG_CROP_THRESHOLD mode.
 *     </p>
 * @return resource Return cropped image resource on success&return.falseforfailure;.
 */
function imagecropauto ($image, $mode = null, $threshold = null, $color = null) {}

/**
 * Scale an image using the given new width and height
 * @link http://www.php.net/manual/en/function.imagescale.php
 * @param image resource 
 * @param new_width int <p>
 *      
 *     </p>
 * @param new_height int[optional] <p>
 *      
 *     </p>
 * @param mode int[optional] <p>
 *      One of IMG_NEAREST_NEIGHBOUR,
 *      IMG_BILINEAR_FIXED,
 *      IMG_BICUBIC,
 *      IMG_BICUBIC_FIXED or anything else (will use two
 *      pass).
 *     </p>
 * @return resource Return scaled image resource on success&return.falseforfailure;.
 */
function imagescale ($image, $new_width, $new_height = null, $mode = null) {}

/**
 * Return an image containing the affine transformed src image, using an optional clipping area
 * @link http://www.php.net/manual/en/function.imageaffine.php
 * @param image resource 
 * @param affine array <p>
 *      Array with keys 0 to 5.
 *     </p>
 * @param clip array[optional] <p>
 *      Array with keys "x", "y", "width" and "height".
 *     </p>
 * @return resource Return affined image resource on success&return.falseforfailure;.
 */
function imageaffine ($image, array $affine, array $clip = null) {}

/**
 * Concat two matrices (as in doing many ops in one go)
 * @link http://www.php.net/manual/en/function.imageaffinematrixconcat.php
 * @param m1 array <p>
 *      Array with keys 0 to 5.
 *     </p>
 * @param m2 array <p>
 *      Array with keys 0 to 5.
 *     </p>
 * @return array Array with keys 0 to 5 and float values&return.falseforfailure;.
 */
function imageaffinematrixconcat (array $m1, array $m2) {}

/**
 * Return an image containing the affine tramsformed src image, using an optional clipping area
 * @link http://www.php.net/manual/en/function.imageaffinematrixget.php
 * @param type int <p>
 *      One of IMG_AFFINE_* constants.
 *     </p>
 * @param options mixed[optional] <p>
 *      
 *     </p>
 * @return array Array with keys 0 to 5 and float values&return.falseforfailure;.
 */
function imageaffinematrixget ($type, $options = null) {}

/**
 * Set the interpolation method
 * @link http://www.php.net/manual/en/function.imagesetinterpolation.php
 * @param image resource 
 * @param method int[optional] <p>
 *       The interpolation method, which can be one of the following:
 *       
 *        
 *         
 *          IMG_BELL: Bell filter.
 * @return bool Returns true on success, false on failure.
 */
function imagesetinterpolation ($image, $method = null) {}

/**
 * Set the tile image for filling
 * @link http://www.php.net/manual/en/function.imagesettile.php
 * @param image resource 
 * @param tile resource <p>
 *       The image resource to be used as a tile.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagesettile ($image, $tile) {}

/**
 * Set the brush image for line drawing
 * @link http://www.php.net/manual/en/function.imagesetbrush.php
 * @param image resource 
 * @param brush resource <p>
 *       An image resource.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagesetbrush ($image, $brush) {}

/**
 * Set the style for line drawing
 * @link http://www.php.net/manual/en/function.imagesetstyle.php
 * @param image resource 
 * @param style array <p>
 *       An array of pixel colors. You can use the 
 *       IMG_COLOR_TRANSPARENT constant to add a 
 *       transparent pixel.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagesetstyle ($image, array $style) {}

/**
 * &gd.image.new;
 * @link http://www.php.net/manual/en/function.imagecreatefrompng.php
 * @param filename string <p>
 *       Path to the PNG image.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefrompng ($filename) {}

/**
 * &gd.image.new;
 * @link http://www.php.net/manual/en/function.imagecreatefromgif.php
 * @param filename string <p>
 *       Path to the GIF image.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromgif ($filename) {}

/**
 * &gd.image.new;
 * @link http://www.php.net/manual/en/function.imagecreatefromjpeg.php
 * @param filename string <p>
 *       Path to the JPEG image.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromjpeg ($filename) {}

/**
 * &gd.image.new;
 * @link http://www.php.net/manual/en/function.imagecreatefromwbmp.php
 * @param filename string <p>
 *       Path to the WBMP image.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromwbmp ($filename) {}

/**
 * &gd.image.new;
 * @link http://www.php.net/manual/en/function.imagecreatefromxbm.php
 * @param filename string <p>
 *       Path to the XBM image.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromxbm ($filename) {}

/**
 * Create a new image from GD file or URL
 * @link http://www.php.net/manual/en/function.imagecreatefromgd.php
 * @param filename string <p>
 *       Path to the GD file.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromgd ($filename) {}

/**
 * Create a new image from GD2 file or URL
 * @link http://www.php.net/manual/en/function.imagecreatefromgd2.php
 * @param filename string <p>
 *       Path to the GD2 image.
 *      </p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromgd2 ($filename) {}

/**
 * Create a new image from a given part of GD2 file or URL
 * @link http://www.php.net/manual/en/function.imagecreatefromgd2part.php
 * @param filename string <p>
 *       Path to the GD2 image.
 *      </p>
 * @param srcX int <p>
 *       x-coordinate of source point.
 *      </p>
 * @param srcY int <p>
 *       y-coordinate of source point.
 *      </p>
 * @param width int <p>&gd.source.width;</p>
 * @param height int <p>&gd.source.height;</p>
 * @return resource &gd.return.identifier;
 */
function imagecreatefromgd2part ($filename, $srcX, $srcY, $width, $height) {}

/**
 * Output a PNG image to either the browser or a file
 * @link http://www.php.net/manual/en/function.imagepng.php
 * @param image resource 
 * @param filename string[optional] <p>&gd.image.path;</p>
 *      
 *       <p>
 *        &null; is invalid if the quality and
 *        filters arguments are not used.
 *       </p>
 * @param quality int[optional] <p>
 *       Compression level: from 0 (no compression) to 9.
 *      </p>
 * @param filters int[optional] <p>
 *       Allows reducing the PNG file size. It is a bitmask field which may be
 *       set to any combination of the PNG_FILTER_XXX 
 *       constants. PNG_NO_FILTER or 
 *       PNG_ALL_FILTERS may also be used to respectively
 *       disable or activate all filters.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagepng ($image, $filename = null, $quality = null, $filters = null) {}

/**
 * &gd.image.output;
 * @link http://www.php.net/manual/en/function.imagegif.php
 * @param image resource 
 * @param filename string[optional] <p>&gd.image.path;</p>
 * @return bool Returns true on success, false on failure.
 */
function imagegif ($image, $filename = null) {}

/**
 * &gd.image.output;
 * @link http://www.php.net/manual/en/function.imagejpeg.php
 * @param image resource 
 * @param filename string[optional] <p>&gd.image.path;</p>
 *      <p>
 *       To skip this argument in order to provide the 
 *       quality parameter, use &null;.
 *      </p>
 * @param quality int[optional] <p>
 *       quality is optional, and ranges from 0 (worst
 *       quality, smaller file) to 100 (best quality, biggest file). The 
 *       default is the default IJG quality value (about 75).
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagejpeg ($image, $filename = null, $quality = null) {}

/**
 * &gd.image.output;
 * @link http://www.php.net/manual/en/function.imagewbmp.php
 * @param image resource 
 * @param filename string[optional] <p>&gd.image.path;</p>
 * @param foreground int[optional] <p>
 *       You can set the foreground color with this parameter by setting an
 *       identifier obtained from imagecolorallocate.
 *       The default foreground color is black.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagewbmp ($image, $filename = null, $foreground = null) {}

/**
 * Output GD image to browser or file
 * @link http://www.php.net/manual/en/function.imagegd.php
 * @param image resource 
 * @param filename string[optional] <p>&gd.image.path;</p>
 * @return bool Returns true on success, false on failure.
 */
function imagegd ($image, $filename = null) {}

/**
 * Output GD2 image to browser or file
 * @link http://www.php.net/manual/en/function.imagegd2.php
 * @param image resource 
 * @param filename string[optional] <p>&gd.image.path;</p>
 * @param chunk_size int[optional] <p>
 *       Chunk size.
 *      </p>
 * @param type int[optional] <p>
 *       Either IMG_GD2_RAW or 
 *       IMG_GD2_COMPRESSED. Default is 
 *       IMG_GD2_RAW.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagegd2 ($image, $filename = null, $chunk_size = null, $type = null) {}

/**
 * Destroy an image
 * @link http://www.php.net/manual/en/function.imagedestroy.php
 * @param image resource 
 * @return bool Returns true on success, false on failure.
 */
function imagedestroy ($image) {}

/**
 * Apply a gamma correction to a GD image
 * @link http://www.php.net/manual/en/function.imagegammacorrect.php
 * @param image resource 
 * @param inputgamma float <p>
 *       The input gamma.
 *      </p>
 * @param outputgamma float <p>
 *       The output gamma.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagegammacorrect ($image, $inputgamma, $outputgamma) {}

/**
 * Flood fill
 * @link http://www.php.net/manual/en/function.imagefill.php
 * @param image resource 
 * @param x int <p>
 *       x-coordinate of start point.
 *      </p>
 * @param y int <p>
 *       y-coordinate of start point.
 *      </p>
 * @param color int <p>
 *       The fill color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagefill ($image, $x, $y, $color) {}

/**
 * Draw a filled polygon
 * @link http://www.php.net/manual/en/function.imagefilledpolygon.php
 * @param image resource 
 * @param points array <p>
 *       An array containing the x and y
 *       coordinates of the polygons vertices consecutively.
 *      </p>
 * @param num_points int <p>
 *       Total number of vertices, which must be at least 3.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagefilledpolygon ($image, array $points, $num_points, $color) {}

/**
 * Draw a filled rectangle
 * @link http://www.php.net/manual/en/function.imagefilledrectangle.php
 * @param image resource 
 * @param x1 int <p>
 *       x-coordinate for point 1.
 *      </p>
 * @param y1 int <p>
 *       y-coordinate for point 1.
 *      </p>
 * @param x2 int <p>
 *       x-coordinate for point 2.
 *      </p>
 * @param y2 int <p>
 *       y-coordinate for point 2.
 *      </p>
 * @param color int <p>
 *       The fill color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagefilledrectangle ($image, $x1, $y1, $x2, $y2, $color) {}

/**
 * Flood fill to specific color
 * @link http://www.php.net/manual/en/function.imagefilltoborder.php
 * @param image resource 
 * @param x int <p>
 *       x-coordinate of start.
 *      </p>
 * @param y int <p>
 *       y-coordinate of start.
 *      </p>
 * @param border int <p>
 *       The border color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @param color int <p>
 *       The fill color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagefilltoborder ($image, $x, $y, $border, $color) {}

/**
 * Get font width
 * @link http://www.php.net/manual/en/function.imagefontwidth.php
 * @param font int 
 * @return int the pixel width of the font.
 */
function imagefontwidth ($font) {}

/**
 * Get font height
 * @link http://www.php.net/manual/en/function.imagefontheight.php
 * @param font int 
 * @return int the pixel height of the font.
 */
function imagefontheight ($font) {}

/**
 * Enable or disable interlace
 * @link http://www.php.net/manual/en/function.imageinterlace.php
 * @param image resource 
 * @param interlace int[optional] <p>
 *       If non-zero, the image will be interlaced, else the interlace bit is
 *       turned off.
 *      </p>
 * @return int 1 if the interlace bit is set for the image, 0 otherwise.
 */
function imageinterlace ($image, $interlace = null) {}

/**
 * Draw a line
 * @link http://www.php.net/manual/en/function.imageline.php
 * @param image resource 
 * @param x1 int <p>
 *       x-coordinate for first point.
 *      </p>
 * @param y1 int <p>
 *       y-coordinate for first point.
 *      </p>
 * @param x2 int <p>
 *       x-coordinate for second point.
 *      </p>
 * @param y2 int <p>
 *       y-coordinate for second point.
 *      </p>
 * @param color int <p>
 *       The line color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imageline ($image, $x1, $y1, $x2, $y2, $color) {}

/**
 * Load a new font
 * @link http://www.php.net/manual/en/function.imageloadfont.php
 * @param file string <p>
 *       The font file format is currently binary and architecture
 *       dependent.  This means you should generate the font files on the
 *       same type of CPU as the machine you are running PHP on.
 *      </p>
 *      <p>
 *       <table>
 *        Font file format
 *        
 *         
 *         <tr valign="top">
 *          <td>byte position</td>
 *          <td>C data type</td>
 *          <td>description</td>
 *         </tr>
 *         
 *         
 *          <tr valign="top">
 *           <td>byte 0-3</td>
 *           <td>int</td>
 *           <td>number of characters in the font</td>
 *          </tr>
 *          <tr valign="top">
 *           <td>byte 4-7</td>
 *           <td>int</td>
 *           <td>
 *            value of first character in the font (often 32 for space)
 *           </td>
 *          </tr>
 *          <tr valign="top">
 *           <td>byte 8-11</td>
 *           <td>int</td>
 *           <td>pixel width of each character</td>
 *          </tr>
 *          <tr valign="top">
 *           <td>byte 12-15</td>
 *           <td>int</td>
 *           <td>pixel height of each character</td>
 *          </tr>
 *          <tr valign="top">
 *           <td>byte 16-</td>
 *           <td>char</td>
 *           <td>
 *            array with character data, one byte per pixel in each
 *            character, for a total of (nchars*width*height) bytes.
 *           </td>
 *          </tr>
 *         
 *        
 *       </table>
 *      </p>
 * @return int The font identifier which is always bigger than 5 to avoid conflicts with
 *   built-in fonts or false on errors.
 */
function imageloadfont ($file) {}

/**
 * Draws a polygon
 * @link http://www.php.net/manual/en/function.imagepolygon.php
 * @param image resource 
 * @param points array <p>
 *       An array containing the polygon's vertices, e.g.:
 *       
 *        
 *         
 *          <tr valign="top">
 *           <td>points[0]</td>
 *           <td>= x0</td>
 *          </tr>
 *          <tr valign="top">
 *           <td>points[1]</td>
 *           <td>= y0</td>
 *          </tr>
 *          <tr valign="top">
 *           <td>points[2]</td>
 *           <td>= x1</td>
 *          </tr>
 *          <tr valign="top">
 *           <td>points[3]</td>
 *           <td>= y1</td>
 *          </tr>
 *         
 *        
 *       
 *      </p>
 * @param num_points int <p>
 *       Total number of points (vertices).
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagepolygon ($image, array $points, $num_points, $color) {}

/**
 * Draw a rectangle
 * @link http://www.php.net/manual/en/function.imagerectangle.php
 * @param image resource 
 * @param x1 int <p>
 *       Upper left x coordinate.
 *      </p>
 * @param y1 int <p>
 *       Upper left y coordinate
 *       0, 0 is the top left corner of the image.
 *      </p>
 * @param x2 int <p>
 *       Bottom right x coordinate.
 *      </p>
 * @param y2 int <p>
 *       Bottom right y coordinate.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagerectangle ($image, $x1, $y1, $x2, $y2, $color) {}

/**
 * Set a single pixel
 * @link http://www.php.net/manual/en/function.imagesetpixel.php
 * @param image resource 
 * @param x int <p>
 *       x-coordinate.
 *      </p>
 * @param y int <p>
 *       y-coordinate.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagesetpixel ($image, $x, $y, $color) {}

/**
 * Draw a string horizontally
 * @link http://www.php.net/manual/en/function.imagestring.php
 * @param image resource 
 * @param font int 
 * @param x int <p>
 *       x-coordinate of the upper left corner.
 *      </p>
 * @param y int <p>
 *       y-coordinate of the upper left corner.
 *      </p>
 * @param string string <p>
 *       The string to be written.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagestring ($image, $font, $x, $y, $string, $color) {}

/**
 * Draw a string vertically
 * @link http://www.php.net/manual/en/function.imagestringup.php
 * @param image resource 
 * @param font int 
 * @param x int <p>
 *       x-coordinate of the bottom left corner.
 *      </p>
 * @param y int <p>
 *       y-coordinate of the bottom left corner.
 *      </p>
 * @param string string <p>
 *       The string to be written.
 *      </p>
 * @param color int <p>
 *       A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagestringup ($image, $font, $x, $y, $string, $color) {}

/**
 * Get image width
 * @link http://www.php.net/manual/en/function.imagesx.php
 * @param image resource 
 * @return int Return the width of the image or false on 
 *   errors.
 */
function imagesx ($image) {}

/**
 * Get image height
 * @link http://www.php.net/manual/en/function.imagesy.php
 * @param image resource 
 * @return int Return the height of the image or false on 
 *   errors.
 */
function imagesy ($image) {}

/**
 * Draw a dashed line
 * @link http://www.php.net/manual/en/function.imagedashedline.php
 * @param image resource 
 * @param x1 int <p>
 *       Upper left x coordinate.
 *      </p>
 * @param y1 int <p>
 *       Upper left y coordinate 0, 0 is the top left corner of the image.
 *      </p>
 * @param x2 int <p>
 *       Bottom right x coordinate.
 *      </p>
 * @param y2 int <p>
 *       Bottom right y coordinate.
 *      </p>
 * @param color int <p>
 *       The fill color. A color identifier created with 
 *       imagecolorallocate.
 *      </p>
 * @return bool Always returns true
 */
function imagedashedline ($image, $x1, $y1, $x2, $y2, $color) {}

/**
 * Give the bounding box of a text using TrueType fonts
 * @link http://www.php.net/manual/en/function.imagettfbbox.php
 * @param size float <p>
 *       The font size.
 *       
 *        
 *         In GD 1, this is measured in pixels. In GD 2, this is measured in
 *         points.
 *        
 *       
 *      </p>
 * @param angle float <p>
 *       Angle in degrees in which text will be measured.
 *      </p>
 * @param fontfile string <p>
 *       The name of the TrueType font file (can be a URL). Depending on
 *       which version of the GD library that PHP is using, it may attempt to
 *       search for files that do not begin with a leading '/' by appending
 *       '.ttf' to the filename and searching along a library-defined font path.
 *      </p>
 * @param text string <p>
 *       The string to be measured.
 *      </p>
 * @return array imagettfbbox returns an array with 8
 *   elements representing four points making the bounding box of the
 *   text on success and false on error.
 *   
 *    
 *     
 *      <tr valign="top">
 *       <td>key</td>
 *       <td>contents</td>
 *      </tr>
 *     
 *     
 *      <tr valign="top">
 *       <td>0</td>
 *       <td>lower left corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>1</td>
 *       <td>lower left corner, Y position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>2</td>
 *       <td>lower right corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>3</td>
 *       <td>lower right corner, Y position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>4</td>
 *       <td>upper right corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>5</td>
 *       <td>upper right corner, Y position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>6</td>
 *       <td>upper left corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>7</td>
 *       <td>upper left corner, Y position</td>
 *      </tr>
 *     
 *    
 *   
 *  </p>
 *  <p>
 *   The points are relative to the text regardless of the
 *   angle, so "upper left" means in the top left-hand 
 *   corner seeing the text horizontally.
 */
function imagettfbbox ($size, $angle, $fontfile, $text) {}

/**
 * Write text to the image using TrueType fonts
 * @link http://www.php.net/manual/en/function.imagettftext.php
 * @param image resource 
 * @param size float <p>&gd.font.size;</p>
 * @param angle float <p>
 *       The angle in degrees, with 0 degrees being left-to-right reading text.
 *       Higher values represent a counter-clockwise rotation. For example, a 
 *       value of 90 would result in bottom-to-top reading text.
 *      </p>
 * @param x int <p>
 *       The coordinates given by x and
 *       y will define the basepoint of the first
 *       character (roughly the lower-left corner of the character). This
 *       is different from the imagestring, where
 *       x and y define the
 *       upper-left corner of the first character. For example, "top left"
 *       is 0, 0.
 *      </p>
 * @param y int <p>
 *       The y-ordinate. This sets the position of the fonts baseline, not the
 *       very bottom of the character.
 *      </p>
 * @param color int <p>
 *       The color index. Using the negative of a color index has the effect of
 *       turning off antialiasing. See imagecolorallocate.
 *      </p>
 * @param fontfile string <p>
 *       The path to the TrueType font you wish to use.
 *      </p>
 *      <p>
 *       Depending on which version of the GD library PHP is using, when
 *       fontfile does not begin with a leading
 *       / then .ttf will be appended
 *       to the filename and the library will attempt to search for that
 *       filename along a library-defined font path.
 *      </p>
 *      <p>
 *       When using versions of the GD library lower than 2.0.18, a space character,
 *       rather than a semicolon, was used as the 'path separator' for different font files.
 *       Unintentional use of this feature will result in the warning message:
 *       Warning: Could not find/open font. For these affected versions, the
 *       only solution is moving the font to a path which does not contain spaces.
 *      </p>
 *      <p>
 *       In many cases where a font resides in the same directory as the script using it
 *       the following trick will alleviate any include problems.
 *       
 * ]]>
 *       
 *      </p>
 * @param text string <p>
 *       The text string in UTF-8 encoding.
 *      </p>
 *      <p>
 *       May include decimal numeric character references (of the form:
 *       &#8364;) to access characters in a font beyond position 127.
 *       The hexadecimal format (like &#xA9;) is supported.
 *       Strings in UTF-8 encoding can be passed directly.
 *      </p>
 *      <p>
 *       Named entities, such as &copy;, are not supported. Consider using 
 *       html_entity_decode
 *       to decode these named entities into UTF-8 strings.
 *      </p>
 *      <p>
 *       If a character is used in the string which is not supported by the
 *       font, a hollow rectangle will replace the character.
 *      </p>
 * @return array an array with 8 elements representing four points making the
 *   bounding box of the text. The order of the points is lower left, lower 
 *   right, upper right, upper left. The points are relative to the text
 *   regardless of the angle, so "upper left" means in the top left-hand 
 *   corner when you see the text horizontally.
 *   Returns false on error.
 */
function imagettftext ($image, $size, $angle, $x, $y, $color, $fontfile, $text) {}

/**
 * Give the bounding box of a text using fonts via freetype2
 * @link http://www.php.net/manual/en/function.imageftbbox.php
 * @param size float <p>&gd.font.size;</p>
 * @param angle float <p>
 *       Angle in degrees in which text will be 
 *       measured.
 *      </p>
 * @param fontfile string <p>
 *       The name of the TrueType font file (can be a URL). Depending on
 *       which version of the GD library that PHP is using, it may attempt to
 *       search for files that do not begin with a leading '/' by appending
 *       '.ttf' to the filename and searching along a library-defined font path.
 *      </p>
 * @param text string <p>
 *       The string to be measured.
 *      </p>
 * @param extrainfo array[optional] <p>
 *       <table>
 *       Possible array indexes for extrainfo
 *        
 *         
 *          <tr valign="top">
 *           <td>Key</td>
 *           <td>Type</td>
 *           <td>Meaning</td>
 *          </tr>
 *         
 *         
 *          <tr valign="top">
 *           <td>linespacing</td>
 *           <td>float</td>
 *           <td>Defines drawing linespacing</td>
 *          </tr>
 *         
 *        
 *       </table>
 *      </p>
 * @return array imageftbbox returns an array with 8
 *   elements representing four points making the bounding box of the
 *   text:
 *   
 *    
 *     
 *      <tr valign="top">
 *       <td>0</td>
 *       <td>lower left corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>1</td>
 *       <td>lower left corner, Y position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>2</td>
 *       <td>lower right corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>3</td>
 *       <td>lower right corner, Y position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>4</td>
 *       <td>upper right corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>5</td>
 *       <td>upper right corner, Y position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>6</td>
 *       <td>upper left corner, X position</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>7</td>
 *       <td>upper left corner, Y position</td>
 *      </tr>
 *     
 *    
 *   
 *  </p>
 *  <p>
 *   The points are relative to the text regardless of the
 *   angle, so "upper left" means in the top left-hand 
 *   corner seeing the text horizontally.
 */
function imageftbbox ($size, $angle, $fontfile, $text, array $extrainfo = null) {}

/**
 * Write text to the image using fonts using FreeType 2
 * @link http://www.php.net/manual/en/function.imagefttext.php
 * @param image resource 
 * @param size float <p>
 *       The font size to use in points.
 *      </p>
 * @param angle float <p> 
 *       The angle in degrees, with 0 degrees being left-to-right reading text.
 *       Higher values represent a counter-clockwise rotation. For example, a 
 *       value of 90 would result in bottom-to-top reading text.
 *      </p>
 * @param x int <p>
 *       The coordinates given by x and
 *       y will define the basepoint of the first
 *       character (roughly the lower-left corner of the character). This
 *       is different from the imagestring, where
 *       x and y define the
 *       upper-left corner of the first character. For example, "top left"
 *       is 0, 0.
 *      </p>
 * @param y int <p>
 *       The y-ordinate. This sets the position of the fonts baseline, not the
 *       very bottom of the character.
 *      </p>
 * @param color int <p>
 *       The index of the desired color for the text, see 
 *       imagecolorexact.
 *      </p>
 * @param fontfile string <p>
 *       The path to the TrueType font you wish to use.
 *      </p>
 *      <p>
 *       Depending on which version of the GD library PHP is using, when
 *       fontfile does not begin with a leading
 *       / then .ttf will be appended
 *       to the filename and the library will attempt to search for that
 *       filename along a library-defined font path.
 *      </p>
 *      <p>
 *       When using versions of the GD library lower than 2.0.18, a space character,
 *       rather than a semicolon, was used as the 'path separator' for different font files.
 *       Unintentional use of this feature will result in the warning message:
 *       Warning: Could not find/open font. For these affected versions, the
 *       only solution is moving the font to a path which does not contain spaces.
 *      </p>
 *      <p>
 *       In many cases where a font resides in the same directory as the script using it
 *       the following trick will alleviate any include problems.
 *       
 * ]]>
 *       
 *      </p>
 * @param text string <p>
 *       Text to be inserted into image. 
 *      </p>
 * @param extrainfo array[optional] <p>
 *       <table>
 *       Possible array indexes for extrainfo
 *        
 *         
 *          <tr valign="top">
 *           <td>Key</td>
 *           <td>Type</td>
 *           <td>Meaning</td>
 *          </tr>
 *         
 *         
 *          <tr valign="top">
 *           <td>linespacing</td>
 *           <td>float</td>
 *           <td>Defines drawing linespacing</td>
 *          </tr>
 *         
 *        
 *       </table>
 *      </p>
 * @return array This function returns an array defining the four points of the box, starting in the lower left and moving counter-clockwise:
 *   
 *    
 *     
 *      <tr valign="top">
 *       <td>0</td>
 *       <td>lower left x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>1</td>
 *       <td>lower left y-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>2</td>
 *       <td>lower right x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>3</td>
 *       <td>lower right y-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>4</td>
 *       <td>upper right x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>5</td>
 *       <td>upper right y-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>6</td>
 *       <td>upper left x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>7</td>
 *       <td>upper left y-coordinate</td>
 *      </tr>
 */
function imagefttext ($image, $size, $angle, $x, $y, $color, $fontfile, $text, array $extrainfo = null) {}

/**
 * Load a PostScript Type 1 font from file
 * @link http://www.php.net/manual/en/function.imagepsloadfont.php
 * @param filename string <p>
 *       Path to the Postscript font file.
 *      </p>
 * @return resource In the case everything went right, a valid font index will be returned and
 *   can be used for further purposes. Otherwise the function returns false.
 */
function imagepsloadfont ($filename) {}

/**
 * Free memory used by a PostScript Type 1 font
 * @link http://www.php.net/manual/en/function.imagepsfreefont.php
 * @param font_index resource <p>
 *       A font resource, returned by imagepsloadfont.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagepsfreefont ($font_index) {}

/**
 * Change the character encoding vector of a font
 * @link http://www.php.net/manual/en/function.imagepsencodefont.php
 * @param font_index resource <p>
 *       A font resource, returned by imagepsloadfont.
 *      </p>
 * @param encodingfile string <p>
 *       The exact format of this file is described in T1libs documentation. 
 *       T1lib comes with two ready-to-use files, 
 *       IsoLatin1.enc and 
 *       IsoLatin2.enc.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagepsencodefont ($font_index, $encodingfile) {}

/**
 * Extend or condense a font
 * @link http://www.php.net/manual/en/function.imagepsextendfont.php
 * @param font_index resource <p>
 *       A font resource, returned by imagepsloadfont.
 *      </p>
 * @param extend float <p>
 *       Extension value, must be greater than 0.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagepsextendfont ($font_index, $extend) {}

/**
 * Slant a font
 * @link http://www.php.net/manual/en/function.imagepsslantfont.php
 * @param font_index resource <p>
 *       A font resource, returned by imagepsloadfont.
 *      </p>
 * @param slant float <p>
 *       Slant level.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagepsslantfont ($font_index, $slant) {}

/**
 * Draws a text over an image using PostScript Type1 fonts
 * @link http://www.php.net/manual/en/function.imagepstext.php
 * @param image resource 
 * @param text string <p>
 *       The text to be written.
 *      </p>
 * @param font_index resource <p>
 *       A font resource, returned by imagepsloadfont.
 *      </p>
 * @param size int <p>
 *       size is expressed in pixels.
 *      </p>
 * @param foreground int <p>
 *       The color in which the text will be painted.
 *      </p>
 * @param background int <p>
 *       The color to which the text will try to fade in with antialiasing.
 *       No pixels with the color background are 
 *       actually painted, so the background image does not need to be of solid
 *       color.
 *      </p>
 * @param x int <p>
 *       x-coordinate for the lower-left corner of the first character.
 *      </p>
 * @param y int <p>
 *       y-coordinate for the lower-left corner of the first character.
 *      </p>
 * @param space int[optional] <p>
 *       Allows you to change the default value of a space in a font. This
 *       amount is added to the normal value and can also be negative.
 *       Expressed in character space units, where 1 unit is 1/1000th of an 
 *       em-square.
 *      </p>
 * @param tightness int[optional] <p>
 *       tightness allows you to control the amount
 *       of white space between characters. This amount is added to the
 *       normal character width and can also be negative.
 *       Expressed in character space units, where 1 unit is 1/1000th of an 
 *       em-square.
 *      </p>
 * @param angle float[optional] <p>
 *       angle is in degrees.
 *      </p>
 * @param antialias_steps int[optional] <p>
 *       Allows you to control the number of colours used for antialiasing 
 *       text. Allowed values are 4 and 16. The higher value is recommended
 *       for text sizes lower than 20, where the effect in text quality is
 *       quite visible.  With bigger sizes, use 4. It's less computationally
 *       intensive.
 *      </p>
 * @return array This function returns an array containing the following elements:
 *   
 *    
 *     
 *      <tr valign="top">
 *       <td>0</td>
 *       <td>lower left x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>1</td>
 *       <td>lower left y-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>2</td>
 *       <td>upper right x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>3</td>
 *       <td>upper right y-coordinate</td>
 *      </tr>
 */
function imagepstext ($image, $text, $font_index, $size, $foreground, $background, $x, $y, $space = null, $tightness = null, $angle = null, $antialias_steps = null) {}

/**
 * Give the bounding box of a text rectangle using PostScript Type1 fonts
 * @link http://www.php.net/manual/en/function.imagepsbbox.php
 * @param text string <p>
 *       The text to be written.
 *      </p>
 * @param font resource 
 * @param size int <p>
 *       size is expressed in pixels.
 *      </p>
 * @return array an array containing the following elements:
 *   
 *    
 *     
 *      <tr valign="top">
 *       <td>0</td>
 *       <td>left x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>1</td>
 *       <td>upper y-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>2</td>
 *       <td>right x-coordinate</td>
 *      </tr>
 *      <tr valign="top">
 *       <td>3</td>
 *       <td>lower y-coordinate</td>
 *      </tr>
 */
function imagepsbbox ($text, $font, $size) {}

/**
 * Return the image types supported by this PHP build
 * @link http://www.php.net/manual/en/function.imagetypes.php
 * @return int a bit-field corresponding to the image formats supported by the
 *   version of GD linked into PHP.  The following bits are returned, 
 *   IMG_GIF | IMG_JPG |
 *   IMG_PNG | IMG_WBMP | 
 *   IMG_XPM.
 */
function imagetypes () {}

/**
 * Convert JPEG image file to WBMP image file
 * @link http://www.php.net/manual/en/function.jpeg2wbmp.php
 * @param jpegname string <p>
 *       Path to JPEG file.
 *      </p>
 * @param wbmpname string <p>
 *       Path to destination WBMP file.
 *      </p>
 * @param dest_height int <p>
 *       Destination image height.
 *      </p>
 * @param dest_width int <p>
 *       Destination image width.
 *      </p>
 * @param threshold int <p>
 *       Threshold value, between 0 and 8 (inclusive).
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function jpeg2wbmp ($jpegname, $wbmpname, $dest_height, $dest_width, $threshold) {}

/**
 * Convert PNG image file to WBMP image file
 * @link http://www.php.net/manual/en/function.png2wbmp.php
 * @param pngname string <p>
 *       Path to PNG file.
 *      </p>
 * @param wbmpname string <p>
 *       Path to destination WBMP file.
 *      </p>
 * @param dest_height int <p>
 *       Destination image height.
 *      </p>
 * @param dest_width int <p>
 *       Destination image width.
 *      </p>
 * @param threshold int <p>
 *       Threshold value, between 0 and 8 (inclusive).
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function png2wbmp ($pngname, $wbmpname, $dest_height, $dest_width, $threshold) {}

/**
 * &gd.image.output;
 * @link http://www.php.net/manual/en/function.image2wbmp.php
 * @param image resource 
 * @param filename string[optional] <p>
 *       Path to the saved file. If not given, the raw image stream will be
 *       output directly.
 *      </p>
 * @param threshold int[optional] <p>
 *       Threshold value, between 0 and 255 (inclusive).
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function image2wbmp ($image, $filename = null, $threshold = null) {}

/**
 * Set the alpha blending flag to use the bundled libgd layering effects
 * @link http://www.php.net/manual/en/function.imagelayereffect.php
 * @param image resource 
 * @param effect int <p>
 *       One of the following constants:
 *       
 *        
 *         IMG_EFFECT_REPLACE
 *         
 *          
 *           Use pixel replacement (equivalent of passing true to
 *           imagealphablending)
 * @return bool Returns true on success, false on failure.
 */
function imagelayereffect ($image, $effect) {}

/**
 * Output an XBM image to browser or file
 * @link http://www.php.net/manual/en/function.imagexbm.php
 * @param image resource 
 * @param filename string <p>&gd.image.path;</p>
 * @param foreground int[optional] <p>
 *       You can set the foreground color with this parameter by setting an
 *       identifier obtained from imagecolorallocate.
 *       The default foreground color is black.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagexbm ($image, $filename, $foreground = null) {}

/**
 * Makes the colors of the palette version of an image more closely match the true color version
 * @link http://www.php.net/manual/en/function.imagecolormatch.php
 * @param image1 resource <p>
 *       A truecolor image link resource.
 *      </p>
 * @param image2 resource <p>
 *       A palette image link resource pointing to an image that has the same
 *       size as image1.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imagecolormatch ($image1, $image2) {}

/**
 * Applies a filter to an image
 * @link http://www.php.net/manual/en/function.imagefilter.php
 * @param image resource 
 * @param filtertype int <p>
 *       filtertype can be one of the following:
 *       
 *        
 *         
 *          IMG_FILTER_NEGATE: Reverses all colors of
 *          the image.
 * @param arg1 int[optional] <p>
 *       
 *        
 *         
 *          IMG_FILTER_BRIGHTNESS: Brightness level.
 * @param arg2 int[optional] <p>
 *       
 *        
 *         
 *          IMG_FILTER_COLORIZE: &gd.value.green;
 * @param arg3 int[optional] <p>
 *       
 *        
 *         
 *          IMG_FILTER_COLORIZE: &gd.value.blue;
 * @param arg4 int[optional] <p>
 *       
 *        
 *         
 *          IMG_FILTER_COLORIZE: Alpha channel, A value 
 *          between 0 and 127. 0 indicates completely opaque while 127 indicates 
 *          completely transparent.
 * @return bool Returns true on success, false on failure.
 */
function imagefilter ($image, $filtertype, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null) {}

/**
 * Apply a 3x3 convolution matrix, using coefficient and offset
 * @link http://www.php.net/manual/en/function.imageconvolution.php
 * @param image resource 
 * @param matrix array <p>
 *       A 3x3 matrix: an array of three arrays of three floats.
 *      </p>
 * @param div float <p>
 *       The divisor of the result of the convolution, used for normalization.
 *      </p>
 * @param offset float <p>
 *       Color offset.
 *      </p>
 * @return bool Returns true on success, false on failure.
 */
function imageconvolution ($image, array $matrix, $div, $offset) {}


/**
 * Used as a return value by imagetypes
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_GIF', 1);

/**
 * Used as a return value by imagetypes
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_JPG', 2);

/**
 * Used as a return value by imagetypes
 *    
 *    
 *     <p>
 *      This constant has the same value as IMG_JPG
 *     </p>
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_JPEG', 2);

/**
 * Used as a return value by imagetypes
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_PNG', 4);

/**
 * Used as a return value by imagetypes
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_WBMP', 8);

/**
 * Used as a return value by imagetypes
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_XPM', 16);

/**
 * Special color option which can be used in stead of color allocated with
 *     imagecolorallocate or
 *     imagecolorallocatealpha
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_COLOR_TILED', -5);

/**
 * Special color option which can be used in stead of color allocated with
 *     imagecolorallocate or
 *     imagecolorallocatealpha
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_COLOR_STYLED', -2);

/**
 * Special color option which can be used in stead of color allocated with
 *     imagecolorallocate or
 *     imagecolorallocatealpha
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_COLOR_BRUSHED', -3);

/**
 * Special color option which can be used in stead of color allocated with
 *     imagecolorallocate or
 *     imagecolorallocatealpha
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_COLOR_STYLEDBRUSHED', -4);

/**
 * Special color option which can be used in stead of color allocated with
 *     imagecolorallocate or
 *     imagecolorallocatealpha
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_COLOR_TRANSPARENT', -6);

/**
 * A style constant used by the imagefilledarc function.
 *    
 *    
 *     <p>
 *      This constant has the same value as IMG_ARC_PIE
 *     </p>
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_ARC_ROUNDED', 0);

/**
 * A style constant used by the imagefilledarc function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_ARC_PIE', 0);

/**
 * A style constant used by the imagefilledarc function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_ARC_CHORD', 1);

/**
 * A style constant used by the imagefilledarc function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_ARC_NOFILL', 2);

/**
 * A style constant used by the imagefilledarc function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_ARC_EDGED', 4);

/**
 * A type constant used by the imagegd2 function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_GD2_RAW', 1);

/**
 * A type constant used by the imagegd2 function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_GD2_COMPRESSED', 2);

/**
 * Used together with imageflip, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FLIP_HORIZONTAL', 1);

/**
 * Used together with imageflip, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FLIP_VERTICAL', 2);

/**
 * Used together with imageflip, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FLIP_BOTH', 3);

/**
 * Alpha blending effect used by the imagelayereffect function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_EFFECT_REPLACE', 0);

/**
 * Alpha blending effect used by the imagelayereffect function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_EFFECT_ALPHABLEND', 1);

/**
 * Alpha blending effect used by the imagelayereffect function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_EFFECT_NORMAL', 2);

/**
 * Alpha blending effect used by the imagelayereffect function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_EFFECT_OVERLAY', 3);
define ('IMG_CROP_DEFAULT', 0);
define ('IMG_CROP_TRANSPARENT', 1);
define ('IMG_CROP_BLACK', 2);
define ('IMG_CROP_WHITE', 3);
define ('IMG_CROP_SIDES', 4);
define ('IMG_CROP_THRESHOLD', 5);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BELL', 1);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BESSEL', 2);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BILINEAR_FIXED', 3);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BICUBIC', 4);
define ('IMG_BICUBIC_FIXED', 5);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BLACKMAN', 6);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BOX', 7);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_BSPLINE', 8);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_CATMULLROM', 9);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_GAUSSIAN', 10);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_GENERALIZED_CUBIC', 11);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_HERMITE', 12);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_HAMMING', 13);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_HANNING', 14);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_MITCHELL', 15);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_POWER', 17);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_QUADRATIC', 18);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_SINC', 19);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_NEAREST_NEIGHBOUR', 16);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_WEIGHTED4', 21);

/**
 * Used together with imagesetinterpolation, available as of PHP 5.5.0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_TRIANGLE', 20);
define ('IMG_AFFINE_TRANSLATE', 0);
define ('IMG_AFFINE_SCALE', 1);
define ('IMG_AFFINE_ROTATE', 2);
define ('IMG_AFFINE_SHEAR_HORIZONTAL', 3);
define ('IMG_AFFINE_SHEAR_VERTICAL', 4);

/**
 * When the bundled version of GD is used this is 1 otherwise 
 *     its set to 0.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('GD_BUNDLED', 1);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_NEGATE', 0);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_GRAYSCALE', 1);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_BRIGHTNESS', 2);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_CONTRAST', 3);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_COLORIZE', 4);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_EDGEDETECT', 5);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_GAUSSIAN_BLUR', 7);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_SELECTIVE_BLUR', 8);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_EMBOSS', 6);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_MEAN_REMOVAL', 9);

/**
 * Special GD filter used by the imagefilter function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_SMOOTH', 10);

/**
 * Special GD filter used by the imagefilter function. 
 *     (Available as of PHP 5.3.0)
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('IMG_FILTER_PIXELATE', 11);

/**
 * The GD version PHP was compiled against.
 *     (Available as of PHP 5.2.4)
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('GD_VERSION', "2.0.35");

/**
 * The GD major version PHP was compiled against.
 *     (Available as of PHP 5.2.4)
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('GD_MAJOR_VERSION', 2);

/**
 * The GD minor version PHP was compiled against.
 *     (Available as of PHP 5.2.4)
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('GD_MINOR_VERSION', 0);

/**
 * The GD release version PHP was compiled against.
 *     (Available as of PHP 5.2.4)
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('GD_RELEASE_VERSION', 35);

/**
 * The GD "extra" version (beta/rc..) PHP was compiled against.
 *     (Available as of PHP 5.2.4)
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('GD_EXTRA_VERSION', "");

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_NO_FILTER', 0);

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_FILTER_NONE', 8);

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_FILTER_SUB', 16);

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_FILTER_UP', 32);

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_FILTER_AVG', 64);

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_FILTER_PAETH', 128);

/**
 * A special PNG filter, used by the imagepng function.
 * @link http://www.php.net/manual/en/image.constants.php
 */
define ('PNG_ALL_FILTERS', 248);

// End of gd v.
?>