GD 




GD is an open source code library for the dynamic creation of images by programmers.

Is written in C, and "wrappers" are available for Perl, PHP and other languages.

+ Creates PNG, JPEG and GIF images, among other formats.

+ Is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly.

+ While not restricted to use on the web, the most common applications of GD involve website development.

The library was originally developed by Thomas Boutell and is now maintained by many contributors: Pierre Joye, Christoph M. Becker, chapg, Chris Reuter, Colin Watson, Dimitar Dobrev, edink, Gilles Espinasse, guenter, Kornel Lesiński, kshepherd, lhecking, Marcin Wojdyr, mattias, Mike Frysinger, Mateusz Loskot (mloskot), Nathanael Jones, nlopess, Ondřej Surý, pornel, Remi Collet, scottmac, tabe, Takeshi Abe, Tim Toohey, tostercx, Vincent Bernat under the umbrella of PHP.net.

The image IDENTIFIER will be represented by: GdImage, this means that the generated image can be represented by a resource or by an object - depending on the PHP version.

Letter fonts used in this tutorial:

   Vera ttf fonts  !
   GDF fonts  !





<style>
@font-face { font-family: Philo; src: url(attf/philo/Philosopher-Italic.ttf);}

.t1 { font-family: Philo; background-color:#00CCFF; font-size:12px; text-align:center;}
.t2 { font-family: Philo; background-color:white; font-size:12px; }
.t14 { font-family: Philo; background-color:#00CCFF; font-size:16px; text-align:center;}
</style>

<div class="circ bfff"><table width="100%" cellspacing="5" 
cellpadding="5" border="1">
<tbody>
<tr class="t14"><td colspan="3">CONSTANTS - gd LIBRARY<br>
<?php  echo 'PHP ' PHP_VERSION '<br>' PHP_VERSION_ID?></td></tr>
<tr class="t1">
<td width="20%">ORDER</td>
<td width="60%">CONSTANT NAME</td>
<td width="20%">VALUE</td>
</tr>        
<?php
// $xt_set = 'gd';
$const get_defined_constants (true);
$c 0;
foreach(
$const['gd'] as $kgd => $vgd)
{
$c++;
?>  
<tr class="t2">
<td><?php echo $c?></td>
<td><?php echo $kgd?></td>
<td><?php echo $vgd?></td>
</tr>
<?php ?>

<tr class="t1">
<td colspan="3">ed48</td>
</tr>
</tbody></table></div>

CONSTANTS - gd LIBRARY
PHP 8.2.18
80218
ORDER CONSTANT NAME VALUE
1 IMG_AVIF 256
2 IMG_GIF 1
3 IMG_JPG 2
4 IMG_JPEG 2
5 IMG_PNG 4
6 IMG_WBMP 8
7 IMG_XPM 16
8 IMG_WEBP 32
9 IMG_BMP 64
10 IMG_TGA 128
11 IMG_WEBP_LOSSLESS 101
12 IMG_COLOR_TILED -5
13 IMG_COLOR_STYLED -2
14 IMG_COLOR_BRUSHED -3
15 IMG_COLOR_STYLEDBRUSHED -4
16 IMG_COLOR_TRANSPARENT -6
17 IMG_ARC_ROUNDED 0
18 IMG_ARC_PIE 0
19 IMG_ARC_CHORD 1
20 IMG_ARC_NOFILL 2
21 IMG_ARC_EDGED 4
22 IMG_GD2_RAW 1
23 IMG_GD2_COMPRESSED 2
24 IMG_FLIP_HORIZONTAL 1
25 IMG_FLIP_VERTICAL 2
26 IMG_FLIP_BOTH 3
27 IMG_EFFECT_REPLACE 0
28 IMG_EFFECT_ALPHABLEND 1
29 IMG_EFFECT_NORMAL 2
30 IMG_EFFECT_OVERLAY 3
31 IMG_EFFECT_MULTIPLY 4
32 IMG_CROP_DEFAULT 0
33 IMG_CROP_TRANSPARENT 1
34 IMG_CROP_BLACK 2
35 IMG_CROP_WHITE 3
36 IMG_CROP_SIDES 4
37 IMG_CROP_THRESHOLD 5
38 IMG_BELL 1
39 IMG_BESSEL 2
40 IMG_BILINEAR_FIXED 3
41 IMG_BICUBIC 4
42 IMG_BICUBIC_FIXED 5
43 IMG_BLACKMAN 6
44 IMG_BOX 7
45 IMG_BSPLINE 8
46 IMG_CATMULLROM 9
47 IMG_GAUSSIAN 10
48 IMG_GENERALIZED_CUBIC 11
49 IMG_HERMITE 12
50 IMG_HAMMING 13
51 IMG_HANNING 14
52 IMG_MITCHELL 15
53 IMG_POWER 17
54 IMG_QUADRATIC 18
55 IMG_SINC 19
56 IMG_NEAREST_NEIGHBOUR 16
57 IMG_WEIGHTED4 21
58 IMG_TRIANGLE 20
59 IMG_AFFINE_TRANSLATE 0
60 IMG_AFFINE_SCALE 1
61 IMG_AFFINE_ROTATE 2
62 IMG_AFFINE_SHEAR_HORIZONTAL 3
63 IMG_AFFINE_SHEAR_VERTICAL 4
64 GD_BUNDLED 1
65 IMG_FILTER_NEGATE 0
66 IMG_FILTER_GRAYSCALE 1
67 IMG_FILTER_BRIGHTNESS 2
68 IMG_FILTER_CONTRAST 3
69 IMG_FILTER_COLORIZE 4
70 IMG_FILTER_EDGEDETECT 5
71 IMG_FILTER_GAUSSIAN_BLUR 7
72 IMG_FILTER_SELECTIVE_BLUR 8
73 IMG_FILTER_EMBOSS 6
74 IMG_FILTER_MEAN_REMOVAL 9
75 IMG_FILTER_SMOOTH 10
76 IMG_FILTER_PIXELATE 11
77 IMG_FILTER_SCATTER 12
78 GD_VERSION 2.0.35
79 GD_MAJOR_VERSION 2
80 GD_MINOR_VERSION 0
81 GD_RELEASE_VERSION 35
82 GD_EXTRA_VERSION
83 PNG_NO_FILTER 0
84 PNG_FILTER_NONE 8
85 PNG_FILTER_SUB 16
86 PNG_FILTER_UP 32
87 PNG_FILTER_AVG 64
88 PNG_FILTER_PAETH 128
89 PNG_ALL_FILTERS 248
ed48

<style>
@font-face { font-family: Philo; src: url(attf/philo/Philosopher-Italic.ttf);}

.t1 { font-family: Philo; background-color:#00CCFF; font-size:12px; text-align:center;}
.t2 { font-family: Philo; background-color:white; font-size:12px; }
.t14 { font-family: Philo; background-color:#00CCFF; font-size:16px; text-align:center;}
</style>

<!-- Run this code to see the result -->

<div class="circ bfff"><table width="100%" cellspacing="5" 
cellpadding="5" border="1">
<tbody>
<tr class="t14"><td>VARIABLES<br>
<?php  echo 'PHP ' PHP_VERSION '<br>' PHP_VERSION_ID?></td></tr>
<tr class="t1">
<td>VARIABLE NAME<br>VALUE</td>
</tr>        
<?php

$var 
$_SERVER;
$c 0;
foreach(
$var as $k => $v)
{
$c++;
?>  
<tr class="t2">
<td><?php echo $k?>
<?php
if(!is_array($v))
{
?>
<br><br><?php echo chunk_split($v64'<br>'); ?></td></tr>
<?php
}
else
{
?>
<br><br><?php var_dump($v); ?></td></tr>

<?php } } ?>

<tr class="t1">
<td>ed48</td>
</tr>
</tbody></table></div>