אהלן,
אני מנסה ליצור תמונה בעזרת Php, לכתוב עליה ולהציג אותה
הנה הקוד
PHP קוד:
$image=imagecreatetruecolor(400,500) or die("Error in create in image with GD");
$black=imagecolorallocate($image, 0, 0, 0);
$pink=imagecolorallocate($image, 233, 14, 91);
$text=$_POST['text'];
$background_color = $black;
$text_color = $pink;
$font = 'arial.ttf';
imagettftext($image, 20, 0, 10, 20, $black, $font, $text);
imagepng($image);
אבל מוצג לי על הפלט הבא:
PHP קוד:
‰PNG ��� IHDR�����פ����¸ל׳��]IDATx�םֱ1���ֲ ץOm �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������€*;�ְׂj����IEND®B`‚
ניסיתי גם להשתמש בפונקציה imagejpeg אבל מוצג לי פלט באותו הסגנון.
אני עובד על שרת ביתי עם PHP5 וניסיתי גם על שרת טריפוד חינמי עם PHP5 והבעיה לא עוברת
למישהו יש רעיון?