Login   Register  
PHP Classes
elePHPant
Icontem

File: TestToImageExample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Er. Rochak Chauhan  >  Text To Image  >  TestToImageExample.php  >  Download  
File: TestToImageExample.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: Text To Image
Render a text string as an image
Author: By
Last change: Uploaded Version 2: Added new features to display and/or save created image.
Date: 2005-06-14 07:12
Size: 776 bytes
 

Contents

Class file image Download
<?php

error_reporting
(E_ALL);
ini_set("display_errors",1);



require_once(
'TextToImage.inc.php');
$textToImage = new ConvertTextToImage;
$textToImage->initializeImage(200150'white''red');

/*
// Optional Check - verify if the color entered by user is a web safe color
if($textToImage->isWebSafeColor($color)) {
   // .... procede
}
else {
  // ... display warning !
}
*/

//$textToImage->ShowTextAsPng(10, 2,2, 'Hello World');
//$textToImage->ShowTextAsJpg(10, 2,2, 'Rochak');
//$textToImage->ShowTextAsGif(10, 11,11, 'Hello dude');

//$textToImage->SaveTextAsGif(10, 11,11, 'Hello dude','hello');
//$textToImage->SaveTextAsJpg(10, 11,11, 'Hello dude','filename');
$textToImage->SaveTextAsPng(1011,11'Hello dude','filename');


?>