הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 29-08-06, 16:45   # 21
Elad-A
הוסטסניון
 
מיני פרופיל
תאריך הצטרפות: May 2006
הודעות: 1,987

Elad-A לא מחובר  

עשיתי משהו כזה:

PHP קוד:
$src_file 'saturn.jpg';
list(
$src_w$src_h$src_t$src_a) = getimagesize($src_file);
$ptr_file 'ip.png'// must have no transparency, but white background
list($ptr_w$ptr_h$ptr_t$ptr_a) = getimagesize($ptr_file);
// destination image dimensions:
$dst_w 400;
$dst_h 200;
// pointer position:
$ptr_x 195;
$ptr_y 70;
$srcImage imageCreateFromJpeg($src_file) or die ('failed imageCreateFromJpg'); 
$dstImage imageCreateTrueColor($dst_w$dst_h) or die ('failed imageCreateTrueColor'); 
imageCopyResampled($dstImage$srcImage0000$dst_w$dst_h$src_w$src_h) or die ('failed imageCopyResampled'); 
$ptrImage imageCreateFromPng($ptr_file) or die ('failed imageCreateFromPng'); 
$ptr_white imageColorAllocate($ptrImage,255,255,255);
imageColorTransparent($ptrImage,$ptr_white);
imageCopyMerge($dstImage$ptrImage$ptr_x$ptr_y00$ptr_w$ptr_h100) or die ('failed imageCopyMerge');
imageJpeg($dstImage,'',100) or die ('failed imageJpeg');
imageDestroy($srcImage) or die ('failed imageDestroy(1)');
imageDestroy($dstImage) or die ('failed imageDestroy(2)');
imageDestroy($ptrImage) or die ('failed imageDestroy(3)'); 
זה התוצאה:

http://elad.fire-serv.net/gd/

צריך לשחק עם זה קצת.
  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. הזמן כעת הוא 10:21.

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