Image Generation Using PHP

alt="Image Generation Using PHP"
title="A Sample Image Generated Using Our Script"
src="http://one.arvind.googlepages.com/php_image_generation.png">



In one of the previous posts about href="http://learning-computer-programming.blogspot.com/2009/03/how-captcha-works-and-simple-script-in.html">CAPTCHA
Image Generation
we made use of PHP’s image generation functions
but didn’t discuss about them. So, if you had any problems or just want
to know more, read on.


Creating and outputting images from PHP is very simple and easy. And
since PHP supports images in a number of different formats you can very
easily generate images in various formats such as JPEG, PNG, GIF etc.
Generating  images involves the following steps:




  1. Creating a canvas.




  2. Drawing




  3. Outputting the image.




Now, let’s look at each of the steps in detail.


Creating a Canvas


Creating a canvas is very easy, just use the following function:


style="color: rgb(0, 0, 187);">resource ImageCreateTrueColor style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">int $width style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $height style="color: rgb(0, 119, 0);">)style="color: rgb(0, 119, 0);">
style="color: rgb(0, 119, 0);">style="color: rgb(0, 0, 187);">

The capitalization doesn’t matter as with any function in PHP.


If you want your canvas to have some background color (default is
black) you can use the following function:


style="color: rgb(0, 0, 187);">bool ImageFill style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $x style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $y style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $color style="color: rgb(0, 119, 0);">)

Where color is to be first allocate using the following function:


style="color: rgb(0, 0, 187);">int ImageColorAllocate style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $red style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $green style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $blue style="color: rgb(0, 119, 0);">)

You can also use an existing image as base canvas for your new
image,
in that case create your image using the following function:


style="color: rgb(0, 0, 187);">resource ImageCreateFromJPEG style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">string $filename style="color: rgb(0, 119, 0);">)

Images in other format can also be used, for PNG →  style="color: rgb(0, 0, 187);">ImageCreateFromPNG style="color: rgb(0, 119, 0);">(), GIF → style="color: rgb(0, 0, 187);">ImageCreateFromGIF style="color: rgb(0, 119, 0);">().


Drawing


After having set up the canvas, let’s draw something on it, say, a
rectangle. The rectangle drawing function with its argument list is:


style="color: rgb(0, 0, 187);">bool ImageRectangle style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $x1 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $y1 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $x2 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $y2 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $color style="color: rgb(0, 119, 0);">)

For allocating color use the style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">() function.


The following will create a square of size 10px X 10px having a blue
border:


style="color: rgb(0, 0, 187);">$img style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageCreateTrueColorstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">20style="color: rgb(0, 119, 0);">, 20style="color: rgb(0, 0, 187);">style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 0);">$blue style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">255style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 119, 0);">style="color: rgb(255, 128, 0);">style="color: rgb(0, 0, 187);">ImageRectanglestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">style="color: rgb(0, 0, 187);">style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$bluestyle="color: rgb(0, 119, 0);">);

You can browse the complete list of href="http://in.php.net/manual/en/ref.image.php">drawing (GD)
functions in PHP
here
.


Some of the common ones are:



  1. bool ImageLine style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $x1 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $y1 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $x2 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $y2 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $color )

  2. style="color: rgb(0, 0, 187);">bool ImageEllipse style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $cx style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $cy style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $width style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $height style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $color style="color: rgb(0, 119, 0);">) style="color: rgb(0, 0, 187);">

  3. style="color: rgb(0, 0, 187);">bool ImageArc style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $cx style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $cy style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $width style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $height style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $start style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $end style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $color style="color: rgb(0, 119, 0);">)




I think we should also discuss a little about one function, to draw
text on out image, it’s called the style="color: rgb(0, 0, 187);">ImageStringstyle="color: rgb(0, 119, 0);">() function having the
following form:


style="color: rgb(0, 0, 187);">bool ImageString style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $font style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $x style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $y style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">string $string style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">int $color style="color: rgb(0, 119, 0);">)style="color: rgb(0, 0, 187);">
style="color: rgb(0, 119, 0);">

Example:


style="color: rgb(0, 0, 187);">$img style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageCreateTrueColorstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">100style="color: rgb(0, 119, 0);">, 100style="color: rgb(0, 0, 187);">style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 0);">$red style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">255style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 0);">ImageStringstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">7style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">style="color: rgb(0, 119, 0);">style="color: rgb(0, 0, 187);">style="color: rgb(0, 119, 0);">style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">, style="color: rgb(221, 0, 0);">'Text'style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$redstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageStringstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">, style="color: rgb(0, 119, 0);">style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">,style="color: rgb(0, 119, 0);"> style="color: rgb(0, 0, 187);">30style="color: rgb(0, 119, 0);">, style="color: rgb(221, 0, 0);">'Smaller Text'style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$redstyle="color: rgb(0, 119, 0);">);



The above lines will draw two string of text and the first one will
have a bigger font size. Higher number fonts (for $font)
are bigger.


All done,now we have a completed image that just needs to be sent to
the browser. For this we first need to tell the browser what type of
content we’re going to send and the data (image) itself. The following
two lines will do this:


style="color: rgb(0, 0, 187);">headerstyle="color: rgb(0, 119, 0);">(style="color: rgb(221, 0, 0);">'Content-Type: image/png'style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImagePNGstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">);

Similarly you can output image in other formats also, just replace style="color: rgb(0, 0, 187);">ImageJPEGstyle="color: rgb(0, 0, 187);"> with style="color: rgb(0, 0, 187);">ImageGIF or style="color: rgb(0, 0, 187);">ImagePNG etc. and the content-type
header to image/gif or image/png
accordingly.


After having output the image there is one more thing we should take
care of-freeing up the resources. You know images can take up
significant amount of resources which may affect the server and other
scripts running on it, so always use the following function:


style="color: rgb(0, 0, 187);">bool ImageDestroy style="color: rgb(0, 119, 0);">( style="color: rgb(0, 0, 187);">resource $image style="color: rgb(0, 119, 0);">)

The following example code illustrates all, what we have learnt:


style="color: rgb(0, 0, 187);"><?
style="color: rgb(255, 128, 0);">/********************************************************
 * DESCRIPTION: Exmple program to illustrate            *
 *              image generation using PHP.             *
 * AUTHOR:      Arvind Gupta                            *
 *              (http://www.arvindgupta.co.in)          *
 * DATE:        21-Mar-09                               *
 * WEBSITE:                                             *
 * http://learning-computer-programming.blogspot.com/   *
 ********************************************************/
// Set width and height
style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">200style="color: rgb(0, 119, 0);">;
style="color: rgb(0, 0, 187);">$heightstyle="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">200style="color: rgb(0, 119, 0);">;

style="color: rgb(255, 128, 0);">// Create canvas
style="color: rgb(0, 0, 187);">$img style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageCreateTrueColorstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$widthstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$heightstyle="color: rgb(0, 119, 0);">);

style="color: rgb(255, 128, 0);">// Allocate colors
style="color: rgb(0, 0, 187);">$gray style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">200style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">200style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">200style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">$red style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">255style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">$green style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">255style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">$blue style="color: rgb(0, 119, 0);">= style="color: rgb(0, 0, 187);">ImageColorAllocatestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">255style="color: rgb(0, 119, 0);">);

style="color: rgb(255, 128, 0);">// Fill background color
style="color: rgb(0, 0, 187);">ImageFillstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">0style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$graystyle="color: rgb(0, 119, 0);">);

style="color: rgb(255, 128, 0);">// Draw
style="color: rgb(0, 0, 187);">ImageRectanglestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">), style="color: rgb(0, 0, 187);">$redstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageLinestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">5 style="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">5style="color: rgb(0, 119, 0);">), style="color: rgb(0, 0, 187);">$redstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageEllipsestyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">), style="color: rgb(0, 0, 187);">$greenstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageArcstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">40style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">40style="color: rgb(0, 119, 0);">), style="color: rgb(0, 0, 187);">180 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">360style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$bluestyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageArcstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">60style="color: rgb(0, 119, 0);">), (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">- style="color: rgb(0, 0, 187);">60style="color: rgb(0, 119, 0);">), style="color: rgb(0, 0, 187);">0 style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">180style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$greenstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageStringstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">7style="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">) - style="color: rgb(0, 0, 187);">50style="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">) - style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">, style="color: rgb(221, 0, 0);">'Image Created'style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$redstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImageStringstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">7style="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$width style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">) - style="color: rgb(0, 0, 187);">30style="color: rgb(0, 119, 0);">, (style="color: rgb(0, 0, 187);">$height style="color: rgb(0, 119, 0);">/ style="color: rgb(0, 0, 187);">2style="color: rgb(0, 119, 0);">) + style="color: rgb(0, 0, 187);">10style="color: rgb(0, 119, 0);">, style="color: rgb(221, 0, 0);">'Using PHP'style="color: rgb(0, 119, 0);">, style="color: rgb(0, 0, 187);">$greenstyle="color: rgb(0, 119, 0);">);

style="color: rgb(255, 128, 0);">// Output
style="color: rgb(0, 0, 187);">headerstyle="color: rgb(0, 119, 0);">(style="color: rgb(221, 0, 0);">'Content-Type: image/png'style="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">ImagePNGstyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">);

style="color: rgb(255, 128, 0);">// Free-Up
style="color: rgb(0, 0, 187);">ImageDestroystyle="color: rgb(0, 119, 0);">(style="color: rgb(0, 0, 187);">$imgstyle="color: rgb(0, 119, 0);">);
style="color: rgb(0, 0, 187);">?>


NOTE: You need to enable the “gd2” extension from “php.ini” for all
this to work. See style="font-style: italic;"
href="http://in.php.net/manual/en/image.setup.php">Installing/Configuring
Image Support in PHP for more information.


Okay, end of this post. Keep checking back for more.

Check out this stream