הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   שאלה על GD (https://hosts.co.il/forums/showthread.php?t=3785)

Ori The Man 29-10-05 21:41

שאלה על GD
 
איך אפשר להשים תמונה ככה?
מה שאני יודע שזה יוצר סתם רקע
איך עושים שמגדירים תמונה ועליה הוא מוסיף דברים?
http://birthday.ms-w.net/1991-1-8.png

meshuga 29-10-05 21:46

ציטוט:

נכתב במקור על ידי Ori The Man
איך אפשר להשים תמונה ככה?
מה שאני יודע שזה יוצר סתם רקע
איך עושים שמגדירים תמונה ועליה הוא מוסיף דברים?
http://birthday.ms-w.net/1991-1-8.png

פשוט מאוד...המשתנה שעליו אתה עושה את התמונה...זה המשתנה עם הלינק לתמונה..ואז עושה את הפונקציה imagecreatefrom לדוגמא:
PHP קוד:

$img="shay.gif";
$img=imagecreatefromgif($img);
$textcolor imagecolorallocate($img00255);
imagestring($img500"Hello world!"$textcolor);
header("Content-type: image/gif");
imagegif($img); 

זה אמור לכתוב על התמונה....shay.gif

Ori The Man 29-10-05 22:11

לא עובד לי
PHP קוד:

header("Content-type: image/gif");
$image="pic.gif";
$image=imagecreatefromgif($img);
$whiteimagecolorallocate($image000);
$red=imagecolorallocate($image255255255);
$text $row['count'];
$font imageloadfont("fonts/Georgia.gdf");
imagestring($image$font15$text$red);
imagegif($image); 

קוד:

<br />
<b>Warning</b>:  imagecolorallocate(): supplied argument is not a valid Image resource in <b>/home/sitenet/domains/sit-e.net/public_html/ori/counter2.php</b> on line <b>13</b><br />
<br />
<b>Warning</b>:  imagecolorallocate(): supplied argument is not a valid Image resource in <b>/home/sitenet/domains/sit-e.net/public_html/ori/counter2.php</b> on line <b>14</b><br />
<br />
<b>Warning</b>:  imagestring(): supplied argument is not a valid Image resource in <b>/home/sitenet/domains/sit-e.net/public_html/ori/counter2.php</b> on line <b>17</b><br />
<br />
<b>Warning</b>:  imagegif(): supplied argument is not a valid Image resource in <b>/home/sitenet/domains/sit-e.net/public_html/ori/counter2.php</b> on line <b>18</b><br />


Ori The Man 29-10-05 23:13

לא משנה סידרתי

meshuga 29-10-05 23:36

אמממ....בשביל הלימוד,הרי זה פורום תמיכה..הטעות שלו הייתה במשתנה(לפי מה שאני רואה):
PHP קוד:

header("Content-type: image/gif"); 
$image="pic.gif"
$image=imagecreatefromgif($image); 
$whiteimagecolorallocate($image000); 
$red=imagecolorallocate($image255255255); 
$text $row['count']; 
$font imageloadfont("fonts/Georgia.gdf"); 
imagestring($image$font15$text$red); 
imagegif($image); 


satan 30-10-05 14:08

ציטוט:

נכתב במקור על ידי meshuga
פשוט מאוד...המשתנה שעליו אתה עושה את התמונה...זה המשתנה עם הלינק לתמונה..ואז עושה את הפונקציה imagecreatefrom לדוגמא:
PHP קוד:

$img="shay.gif";
$img=imagecreatefromgif($img);
$textcolor imagecolorallocate($img00255);
imagestring($img500"Hello world!"$textcolor);
header("Content-type: image/gif");
imagegif($img); 

זה אמור לכתוב על התמונה....shay.gif

אתה אומר שיהיה כתוב על התמונה את שם השתמונה + סיומת..
אבל כתוב "hello world!" אם זה לא אמור להיות כתוב על התמונה אז מה המשמעות של "שלום עולם"...?
וגם ראיתי שכתבת imagecreatefromgif איך אפשר שזה יהיה כללי כזה? כאילו זה יעבוד רק על קבצי GIF?


כל הזמנים הם GMT +2. הזמן כעת הוא 01:40.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ