![]() |
[استفسار] كيفية تصدير هذا الكود الي صورة !
السلام عليكم ورحمة الله وبركاته
اسعد الله اوقاتكم اخواني الكرام .. كنت ابحث مؤخراً عند كود يقوم بمدج صورتين في صورة . ولقيت كود لكن هناك مشكلة في البداية اسمحو لي ان اوضح المطلوب بالضبط الان لدي 3 صور اريد دمجهم بصورة واحدة عن طريق php الصورة الاولى : http://shoot-sport.com/images/car.png الصورة الثانية : http://shoot-sport.com/images/car1.png الصورة الثالثة : http://shoot-sport.com/images/photo.jpg بعد دمجهم بالكود اصبح الشكل كالتالي http://shoot-sport.com/images/as.php وهو الشكل المطلوب .. ولكن المطلوب حالياً هو تصدير ملف الــ php الي ملف jpg او اي امتداد المهم تكون كصورة وليس صفحة php الكود .. رمز PHP: // Load the stamp and the photo to apply the watermark to $stamp = imagecreatefrompng('http://shoot-sport.com/images/car.png'); $stamp1 = imagecreatefrompng('http://shoot-sport.com/images/car1.png'); $im = imagecreatefromjpeg('http://shoot-sport.com/images/photo.jpg'); // Set the margins for the stamp and get the height/width of the stamp image $marge_right = 10; $marge_bottom = 15; $marge_right1 = 400; $marge_bottom1 = 15; $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, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp)); imagecopy($im, $stamp1, imagesx($im) - $sx - $marge_right1, imagesy($im) - $sy - $marge_bottom1, 0, 0, imagesx($stamp1), imagesy($stamp1)); // Output and free memory header('Content-type: image/png'); imagepng($im); imagedestroy($im); شكراً أكثر... |
الساعة الآن 10:36 PM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
منتديات بلاك بيري
mjawshy.net
المجاوشي للتقنية المتقدمة