GD Support Hosting : Compare Hosting
Oops! No Hosting Plans Match Your Search
You've selected a combination of features that none of the web hosts we profile offer. We suggest you remove your last filter or reset & start again.
Ask Our Experts
Need help with your hosting? Tell us exactly what you are looking for and we’ll do our very best to help. Please allow one working day for a response.
Please fill in all fields.
Thanks! Your request has been sent. We'll reply within 24 hours.
Recommended Host for GD Support
GD Supported Formats
GD Graphics library has read and write capabilities for most commonly used graphics formats, including: JPEG, PNG, GIF, XBM, WBMP, and WebP. GD can read XPM files but cannot write to them currently.
It should be noted that not every GD implementation supports every read/write format possibility. For example, if using GD Graphics Library with PHP, each format has to be compiled into the GD PHP library, and not all web hosts will have done this when they set up their environment. Similar issues crop up in other scripting-language wrappers.
This can usually be fixed easily, but it is an important thing to note when developing and deploying graphics-based web applications that take advantage of the GD library.
GD Features and Uses
GD can be used to manipulate and edit existing images, or to create new images from scratch. It has font support, so it can be used to add text to images as well, using any fonts installed on the same computer. Other uses include image analysis and transforming images from one format to another.
It's important to remember the GD Graphics Library isn't an application or a tool for end users, but is a programming library. It is used by programmers to develop applications that include image processing.
To get a small sense of the types of applications that might use GD Graphics Library, here are a small number of example use cases:
- Web based meme generator that adds text on top of submitted photos.
- Data visualization tools that translate raw data into images such as charts, graphs, and abstract art.
- Image format conversion.
- Free style drawing apps.
- In-browser image editing.
- Color correction.
- Automated watermarking.
- Batch image processing.
GD PHP Examples
This is not intended to be a tutorial of GD Image Library, but providing an example of how it might work in the real world should give you some idea of what GD Image Library is capable of.
Basic coding example
The following will create an image and send the appropriate file headers along with it. This could be placed on a PHP-enabled webserver at (for example)
<img src="/dynamic-image.php?input_text=inputVariable" />) to display an image that is generated programatically, based on some input parameters in a web form.
<?php header ("Content-type: image/png"); $image_text = $_GET['input_text']; $image = ImageCreate (200, 75); $bg_color = ImageColorAllocate ($image, 102, 0, 102); $txt_color = ImageColorAllocate ($image, 255, 255, 153); ImageString ($image, 5, 5, 18, $input_text, $txt_color); ImagePng ($image); ?>
This script takes an input parameter text, creates an image 200 pixels wide and 75 pixels tall, colors the background purple, writes the text on the image in yellow, and then output the image as a png file.
This script creates a new image every time the
src URL is called. Another option might be to take input parameters and then write the image to a file so that it can be accessed as a static asset. This can also be done with GD Graphics Library.
Because PHP (and other languages) can read input files and iterate over sets of files, you could easily use GD Graphics Library to read in every image file in a directory, perform some specific edit to them (like adding a custom watermark) and then write the new files to another directory.
Another idea: On-the-fly display edits
Another interesting use might be on-the-fly watermarking, which is very important for stock photo sites and other websites that need to protect their content or add copyright notices.
If an unedited image exists at
/hidden/example.png, it could be referenced in HTML documents as
/public/watermark.php?src=example.png. In this scheme, all images would be served through a PHP script that reads in the
example.png parameter and then uses it to access the original file and add the watermarks when needed. This would make it easy to change the watermarks at any time, and eliminate the need to store two different versions of a file.
A similar concept could be used for generating multiple image sizes and formats.
When used in conjunction with an image caching server or a Content Delivery Network, a wide variety of formats could be offered, created only when accessed, and stored so that computing resources are only expended the first time they are needed.
GD Image Library Hosting
GD Image Library comes standard with PHP, and is also included in several other languages. Most web servers will have it available without any additional hassle, but it is worth checking on if it is a critical need for your website or application.
Some hosting providers advertise as â€œGD Library Hosting experts,â€ and may provide PHP scripting services, custom content, or GD Library additional support (such as GD Library-specific tutorials or webinars) for a modest fee.