| list($owidth,$oheight) = getimagesize($oldimage_name);
$width = $height = 400;
$image = imagecreatetruecolor($width, $height);
$image_src = imagecreatefromjpeg($oldimage_name);
imagecopyresampled($image, $image_src, 0, 0, 0, 0, $width, $height, $owidth, $oheight);
$colour = imagecolorallocate($image, 0, 0, 0);
imagettftext($image, $font_size, 0,5, 190, $colour, $font_path, $watermark_text);
imagejpeg($image, $new_image_name, 100);
imagedestroy($image);
unlink($oldimage_name);
form code
| <form name="imageUpload" id="imageUpload" method="post"
enctype="multipart/form-data" >
Image :<input type="file" name="imgfile" id="imgfile"/><br />
<input type="submit" name="createmark" id="createmark" value="Submit" />
|
|
0 comments:
Post a Comment