 |
|
ผมมีปัญหากับภาษาไทย เวลาที่เพิ่มข้อความลงในรูปภาพนะครับ ภาษาไทยมันกลายเป็นตัวสี่เหลี่ยมนะครับ รบกวนผู้รู้แก้ให้หน่อยครับ
Code (PHP)
function createImage($text,$id){
$fileRand = md5($id);
$backgroundimage = "infoBG.jpg";
$im=imagecreatefromjpeg($backgroundimage);
$colour = imagecolorallocate($im, 0, 51, 204);
//$font = 'DSESIN.ttf';
$font = "DSNSIN_.ttf";
$angle = 0;
// Add the text
imagettftext($im, 26, $angle, 50, 28, $colour, $font, $text);
$outfile= "SecurityImages/$fileRand.jpg";
imagejpeg($im,$outfile,100);
return $outfile;
}
echo "<IMG SRC=".createImage('ประวัติ','12')." name=secimg>";
Tag : - - - -
|
|
 |
 |
 |
 |
Date :
2010-01-05 09:57:54 |
By :
comcung |
View :
879 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |