Multiple errors in the PHP Example.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@293621 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Yago Ferrer 2010-01-16 15:42:58 +00:00
parent dff28894d8
commit 8e12866096

View file

@ -54,11 +54,11 @@ function LoadWBMP($imgname)
if(!$im)
{
/* Create a blank image */
$im = imagecreatetruecolor (20, 20);
$im = imagecreatetruecolor(150, 30);
$bgc = imagecolorallocate($im, 255, 255, 255);
$tc = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 10, 10, $bgc);
imagefilledrectangle($im, 0, 0, 150, 30, $bgc);
/* Output an error message */
imagestring($im, 1, 5, 5, 'Error loading ' . $imgname, $tc);
@ -67,11 +67,11 @@ function LoadWBMP($imgname)
return $im;
}
header('Content-Type: image/png');
header('Content-Type: ' . image_type_to_mime_type(IMAGETYPE_WBMP));
$img = LoadPNG('bogus.image');
$img = LoadWBMP('bogus.image');
imagwbmp($img);
imagewbmp($img);
imagedestroy($img);
?>
]]>