hackerman Posted March 3, 2007 Report Share Posted March 3, 2007 Kā var bildei pielikt logo apakšā pec augšupielādēs? Līdzīgi kā bildez.lv, draugiem.lv utt ? Link to comment Share on other sites More sharing options...
andrisp Posted March 3, 2007 Report Share Posted March 3, 2007 http://www.google.lv/search?hl=lv&q=php+image+watermark Link to comment Share on other sites More sharing options...
hackerman Posted April 5, 2007 Author Report Share Posted April 5, 2007 (edited) Es atradu tādu skriptu: <?php header('content-type: image/jpeg'); $watermark = imagecreatefrompng('watermark.png'); $watermark_width = imagesx($watermark); $watermark_height = imagesy($watermark); $image = imagecreatetruecolor($watermark_width, $watermark_height); $image = imagecreatefromjpeg($_GET['src']); $size = getimagesize($_GET['src']); $dest_x = $size[0] - $watermark_width - 5; $dest_y = $size[1] - $watermark_height - 5; imagecopymerge($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, 100); imagejpeg($image); imagedestroy($image); imagedestroy($watermark); ?> Bet viņš to watermark neiestrādā bildē. Watermark parādās tikai piem. index.php?src=123.jpg Tad watermark parādās, bet tā fails 123.jpg nav apstrādāts =/ Kā šito kodu iedabūt upload skriptā tā, lai viņš apstrādā pašu bildi? Parādīt jums to upload skriptu? Edited April 5, 2007 by hackerman Link to comment Share on other sites More sharing options...
andrisp Posted April 5, 2007 Report Share Posted April 5, 2007 1) Izņem header, 2) imagejpeg pievieno otro parametru, kur norādi nosaukumu kādā saglabāt attēlu. Skaties manuāli. Link to comment Share on other sites More sharing options...
cucumber Posted April 5, 2007 Report Share Posted April 5, 2007 Protams ja gd off, tad var meginat vienu bildi palaist ka background otru ka bildi (gif, png) ar backgroundu transparentu. Tas bus tikai ka fake watermark :) Link to comment Share on other sites More sharing options...
Recommended Posts