this code doesn't work:
Code: Select all
$fp = fopen("c:/tmp.png","w");
$fd = ImagePng($image);
while (!feof($fd)){
fwrite($fp,$fd,1024);
}
fclose($fp);any suggestions?
thanks
Guy
Moderator: General Moderators
Code: Select all
$fp = fopen("c:/tmp.png","w");
$fd = ImagePng($image);
while (!feof($fd)){
fwrite($fp,$fd,1024);
}
fclose($fp);Code: Select all
<?php function MkPNG($Text,$FileName, $Font=3)
{
$PixLen = (110-(strlen($Text)*7))/2;
$im = @ImageCreate (110, 20);
$background_color = ImageColorAllocate ($im, 0, 52, 102);
$text_color = ImageColorAllocate ($im, 255, 255, 255);
ImageString ($im, $Font, $PixLen, 2, $Text, $text_color);
imagefilledrectangle($im,2,16,108,17,$text_color);
ImagePNG ($im,$FileName.".png");
};
?>