close
<?php
// 創建圖像句柄
$im = imagecreatetruecolor(200, 200);
// 分配顏色
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
// 載入 PostScript 字體
$font = imagepsloadfont('font.pfm');
// 將字體寫入圖像
imagepstext($im, 'Sample text is simple', $font, 12, $black, $white, 50, 50);
// 輸出圖像並釋放內存
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
全站熱搜