PHP

How to Find GD Version

A snippet to print the current version of GD being used by your PHP installation and/or all information about the GD install.

<?php

    // print GD Version;
    $gd_info = gd_info();
    print '<strong>GD Version:</strong> '. $gd_info['GD Version'];
   
    // print all GD info
    print '<br /><br /><strong>GD Info:</strong><br />';
    printf('<pre>%s</pre>', print_r($gd_info, TRUE));

?>

Outputs something like this...

GD Version: bundled (2.0.34 compatible)

GD Info:
Array
(
[GD Version] => bundled (2.0.34 compatible)
[FreeType Support] => 1
[FreeType Linkage] => with freetype
[T1Lib Support] => 1
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>
)