Login   Register  
PHP Classes
elePHPant
Icontem

File: im.php3

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of trawa  >  HTML_graph  >  im.php3  >  Download  
File: im.php3
Role: ???
Content type: text/plain
Description: image generator
Class: HTML_graph
Author: By
Last change:
Date: 13 years ago
Size: 2,247 bytes
 

Contents

Class file image Download
<?
// ############################################################################
// #                                                                          #
// # PROGRAMME NAME: im.php3                          DATE: 2001/05/02        #
// #                                                                          #
// # AUTHOR                                                                   #
// # ======                                                                   #
// #                                                                          #
// # Clive W Smart                                                            #
// #                                                                          #
// # DESCRIPTION                                                              #
// # ===========                                                              #
// #                                                                          #
// # Create a 1 pixel x 1 pixel Image with the colour submitted (in r,g,b)    #
// #                                                                          #
// # Parameters                                                               #
// # ==========                                                               #
// # int $r  -  Red                                                           #
// # int $g  -  Green                                                         #
// # int $b  -  Blue                                                          #
// # int $t  -  Transparent 1=transparent / else not                          #
// #                                                                          #
// ############################################################################
// #                           Copyright None - GPL                           #
// ############################################################################

if (!isset($r)) $r=0;
if (!isset($g)) $g=0;
if (!isset($b)) $b=0;

$im = imagecreate(1, 1);
$back = ImageColorAllocate($im, $r,$g,$b);
imagefill($im, 0, 0, $back);
if (isset($t) && $t == 1) {
   imagecolortransparent($im, $back);
}
Header("Content-type:  image/gif");
imagegif($im);
?>