GD Library

GD is an open source code library for the dynamic creation of images by programmers. GD creates PNG, JPEG and GIF images, among other formats. GD 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 web site development.

More info and download the GD Library follow the links,

http://www.libgd.org/Main_Page

Functionalities:

http://in2.php.net/manual/en/book.image.php

Here I posted the code to check whether the GD Library added in your server properly enabled or not.

echo ‘<div style=”margin: 10px;”>’;

echo ‘<p style=”color: #444444; font-size: 130%;”>GD is ‘;

if (function_exists(“gd_info”)) {

 echo ‘<span style=”color: #00AA00; font-weight: bold;”>supported</span> by your server!</p>’;

 $gd = gd_info();
       
 foreach ($gd as $k => $v) {

  echo ‘<div style=”width: 340px; border-bottom: 1px solid #DDDDDD; padding: 2px;”>’;
  echo ‘<span style=”float: left;width: 300px;”>’ . $k . ‘</span> ‘;

  if ($v)
   echo ‘<span style=”color: #00AA00; font-weight: bold;”>Yes</span>’;
  else
   echo ‘<span style=”color: #EE0000; font-weight: bold;”>No</span>’;

  echo ‘<div style=”clear:both;”><!– –></div></div>’;
 }

} else {

 echo ‘<span style=”color: #EE0000; font-weight: bold;”>not supported</span> by your server!</p>’;

}

echo ‘<p>by <a href=”http://www.dagondesign.com”>dagondesign.com</a></p>’;

echo ‘</div>’;

Here the above code will display status like this,

Advertisements

1 Comment

  1. Rudolf said,

    August 12, 2009 at 12:35 am

    … can you also tell me how the PHP activation code for a such GD Library generated security code/image usually looks like and most of all how to tweek it to display what i want rather than what a free script has by default (that is to hard to read)???


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: