GB library is a graphics software library formanipulate images which was developed by Thomas Boutell in 1994. The current stable version in 2.1.1 released on January, 2015 written in C language. GD supports numerous programming languages including C, PHP, Perl, Python, OCaml, Tcl, Lua, Pascal, GNU Octave, REXX, Rubyand Go.

To install GD support for PHP in Ubuntu,

  1. Run the following command to install GD:
    sudo apt-get install php5-gd
  2. Restart your Apache web server.

You can check to see if the GD library is enabled by creating a simple phpinfo page on your web server.

  1. Create a new file called

  2. Open this file in Notepad, or your preferred WYSIWYG editor such as Dreamweaver.
  3. Add the following line of code:
  4. Save your file within your local web server.
  5. Open a web browser such as Firefox or Internet Explorer.
  6. In the Address bar, enter the URL to this file.

    Typically, on your local testing server, this will be http://localhost/phpinfo.php.
  7. If the GD library is enabled, the resulting page should display the following section.