19-07-2007, 12:18
|
|
|
חבר מתאריך: 05.10.05
הודעות: 687
|
|
הצלחתי ליצור פס על כל האורך ורשמתי עליו משהו:
קוד PHP:
// Set the content-type //header("Content-type: image/jpeg"); // Create the image $im = imagecreatefromjpeg("test.jpg"); list($width, $height) = getimagesize("test.jpg"); // Create some colors $white = imagecolorallocate($im, 0x00, 0x00, 0x00); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 255, 255, 255); imagefilledrectangle($im, 0, 0, $width, 15, $white); // The text to draw $text = 'Bla bla bla bla'; // Replace path by your own font path $font = 'tahoma.ttf'; // Add some shadow to the text imagettftext($im, 10, 0, 11, 13, $grey, $font, $text); // Add the text imagettftext($im, 10, 0, 10, 12, $black, $font, $text); imagejpeg($im); imagedestroy($im);
הבעיה היא שהוא בתחילת (בלמעלה) התמונה ולא בתחתית..
איך אני מוריד אותו שיהיה בתחתית?
תודה רבה
נערך לאחרונה ע"י Roeen בתאריך 19-07-2007 בשעה 12:38.
|