<?php
/*
 * generate some thousand images
 */

$config = array(
	'text' => 'test',
	'file' => 'test.png',
	'inde' => 0,
	'size' => array('w'=>'80', 'h'=>'32'),
); 

for($i = 0; $i < 80000; $i ++) {
	$config['text'] = (int) $i;
	$config['file'] = sprintf('%05d.png', $i);
	create_image($config);
}

function create_image($config) {
	extract($config);

	$im    = imagecreate($size['w'], $size['h']);
	$white = ImageColorAllocate ($im, 255, 255, 255);
	$black = ImageColorAllocate ($im, 0, 0, 0);
	$grey  = ImageColorAllocate ($im, 102, 102, 102);
	$mask  = ImageColorAllocate ($im, 255, 0, 255);

	imagettftext($im, 8, 0, 0, 14, $mask, 'verdana.ttf', $text);	
	imagepng($im, $file);
	imagedestroy($im);
}


return; #EOF
?>