• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 14 رای - 2.64 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: Watermark کردن تصاویر در PHP
حالت موضوعی
#1
اضافه کردن watermark به تصویر ! این روش از alpha channel تصویر استفاده می کنه.
کد پی‌اچ‌پی:
<!--?php
// Load the stamp and the photo to apply the watermark to
$stamp imagecreatefrompng('stamp.png');
$im imagecreatefromjpeg('photo.jpeg');

// 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);
// ParsiCoders.com
// 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/png');
imagepng($im);
imagedestroy($im);
?>
باید حرف زورو نشنوم کر شم فقط -- تو نه رفیق ریگی نیست به کفشم نترس

 نه ، نه من تروریست نیستم -- من رو کاغذ می بازم ولی تئوری نیستم

باید دردای دلمو و تو دلم چال کنم -- تا چشمای من یه روزی  یهویی خیس  شن
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  اضافه کردن www دز ابتدای دامنه Amin_Mansouri 0 1,336 12-20-2016، 08:59 PM
آخرین ارسال: Amin_Mansouri
  کد نمایش پاپ اپ (popup) هنگام باز کردن سایت Amin_Mansouri 0 1,493 12-02-2016، 01:22 PM
آخرین ارسال: Amin_Mansouri
  افزایش سرعت وب سایت با استفاده از فعال کردن Buffer Flushing Ghoghnus 2 4,377 02-08-2016، 11:03 AM
آخرین ارسال: ec1364
Question تصاویر در myBB analyze 2 2,837 09-22-2012، 12:02 PM
آخرین ارسال: Amin_Mansouri
  سورس کد حذف ویرایش و اضافه کردن در دیتابیس (ساده) (php( Amin_Mansouri 0 7,347 09-04-2012، 11:37 PM
آخرین ارسال: Amin_Mansouri
  پیدا کردن و جایگزین کردن (Find & Replace) Kei armin 0 1,941 06-18-2012، 08:20 AM
آخرین ارسال: Kei armin
  سورس کد لاگین کردن به اف تی پی و اپلود فایل(پی اچ پی) Amin_Mansouri 0 3,954 06-17-2012، 09:32 AM
آخرین ارسال: Amin_Mansouri
  افزایش سرعت وب سایت با استفاده از فعال کردن Buffer Flushing Ghoghnus 0 2,980 07-21-2011، 10:52 AM
آخرین ارسال: Ghoghnus

پرش به انجمن:


Browsing: 1 مهمان