libgd/libgd logo

libgd/libgd

Free

GD Graphics Library

FreeFree tier
Type
Open Source

About libgd/libgd

GD is an open source code library for dynamic creation of images by programmers. Written in C, with wrappers available for Perl, PHP, and other languages, GD can read and write numerous image formats including WebP, JPEG, PNG, AVIF, HEIF, TIFF, BMP, GIF, TGA, WBMP, and XPM. It is commonly used to generate charts, graphics, thumbnails, and convert images on the fly, both for web development and standalone applications. The library was originally developed by Thomas Boutell and is now maintained by a community of contributors. GD supports platform builds on Linux, Windows, macOS, ARM, and more, and compiles with GCC, Clang, Visual Studio, Xcode, and MingW. It optionally integrates external libraries like FreeType, Fontconfig, libraqm, and libimagequant for extended capabilities.

Key Features

Open source code library for dynamic image creation
Written in C with wrappers for Perl, PHP, and other languages
Supports image formats: WebP, JPEG, PNG, AVIF, HEIF, TIFF, BMP, GIF, TGA, WBMP, XPM
Generates charts, graphics, thumbnails, and converts images
Optional external libraries: FreeType, Fontconfig, libraqm, libimagequant
Cross-platform: Linux, Windows, macOS, ARM, *BSD, Solaris
Compiles with GCC, Clang, Visual Studio, Xcode, MingW
Community maintained with GitHub discussions, issues, and mailing list

Pros & Cons

Pros
  • Free and open source with permissive license
  • Wide support for popular image formats including modern ones like WebP and AVIF
  • Long-standing library with mature and stable codebase
  • Available in many programming languages via wrappers
  • Cross-platform compatibility with extensive CI testing
  • Active community maintenance and support
Cons
  • Requires programming knowledge to use; not a user-facing graphical application
  • Some image format support depends on external libraries that may complicate installation
  • Does not include JPEG 2000 support
  • Low-level C API may be less convenient than higher-level libraries for simple tasks

Best For

Dynamic image creation for websitesGenerating charts and graphics on the flyCreating thumbnails for imagesConverting images between formatsStandalone image processing applicationsServer-side image manipulation with PHP GD extension

FAQ

What is GD?
GD is an open source code library for the dynamic creation of images by programmers. It is written in C and has wrappers for Perl, PHP, and other languages.
What image formats does GD support?
GD supports WebP, JPEG, PNG, AVIF, HEIF, TIFF, BMP, GIF, TGA, WBMP, and XPM (depending on external libraries).
Can GD be used for non-web applications?
Yes, GD can be used with any standalone application, not just for web development.
Who maintains GD?
GD was originally developed by Thomas Boutell and is now maintained by many contributors. The project is hosted on GitHub at libgd/libgd.
Where can I get support or report bugs?
Support is available via GitHub discussions, issue reports, and pull requests. There is also a mailing list at gd-devel@lists.php.net.