Jump to content
php.lv forumi

Bilde uz bildes


hackerman

Recommended Posts

  • 1 month later...

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 by hackerman
Link to comment
Share on other sites

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

×
×
  • Create New...