הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 16-07-09, 18:23   # 4
TGF.co.il
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2007
מיקום: ירושלים
הודעות: 123

TGF.co.il לא מחובר  

כמובן שעשיתי על פי ותו פורמט, אבל שיניתי רק בסוף שזה ישמור כJPG ולא כPNG.
זו הפונקציה:
PHP קוד:
function water_mark($imgfile) {
// Load the stamp and the photo to apply the watermark to
$stamp imagecreatefrompng('./images/stamp.png');
$im imagecreatefromjpeg('./uploads/'.$imgfile);

// Set the margins for the stamp and get the height/width of the stamp image
$marge_right 10;
$marge_bottom 10;
$sx imagesx($stamp);
$sy imagesy($stamp);

// Copy the stamp image onto our photo using the margin offsets and the photo 
// width to calculate positioning of the stamp. 
imagecopy($im$stampimagesx($im) - $sx $marge_rightimagesy($im) - $sy $marge_bottom00imagesx($stamp), imagesy($stamp));

// Output and free memory
header('Content-type: image/jpeg');
imagejpeg($im);
imagedestroy($im);

return 
$im;

וזו הקריאה לפונקציה, שהיא נמצאת בדף אחר, אבל כמובן מאונקלדת:
PHP קוד:
                move_uploaded_file($file_tmp$path.$File);
                
water_mark($File); 
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


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

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