댓글 검색 목록

[php] 이미지 위에 텍스트 쓰기

페이지 정보

작성자 운영자 작성일 15-05-18 21:45 조회 2,077 댓글 0

<form name="form1" method='post' enctype="multipart/form-data">

<table align='center'>

<tr><td>Image</td><td><input type="file" name="file" id="file"/></td></tr>

<tr><td colspan='2' align='center'><input type='submit' value='submit' name='submit'></td></tr>

</table>

</form>

$newname="alter.jpg";

$copied = copy($_FILES['file']['tmp_name'], $newname);

$im = imagecreatefromjpeg($newname);

$textcolor = imagecolorallocate($im, 3, 3, 255);

// Write the string at the top left

imagestring($im, 12, 0, 0, 'Hello world!', $textcolor);

imagejpeg($im,$newname) 

댓글목록 0

등록된 댓글이 없습니다.

웹학교 로고

온라인 코딩학교

코리아뉴스 2001 - , All right reserved.