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

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 16-07-09, 18:08   # 1
Rom
Winner
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,359

Rom לא מחובר  

אני משער שאתה רוצה שננחש את הקוד?
תראה לנו את הקוד שאחרי לזה, ונעזור לך.

ותבדוק שהקבצים הם מאותו פורמט כמו באתר PHP (הסימן - PNG, התמונה - JPG).
__________________
בברכה, רום.
מתכנת אפליקציות אינטרנט.

אימייל: Rom.As10@gmail.com
מסנג'ר: Rom_as10@hotmail.com
  Reply With Quote
ישן 16-07-09, 18:23   # 2
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. הזמן כעת הוא 13:55.

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