이미지에 글자쓰기 정보
PHP 이미지에 글자쓰기
본문
요즘은 html5로 많이 사용하지만
프로그램을 입힐 경우 유용해보입니다.
$im = imagecreatetruecolor(300, 100);
$red = imagecolorallocate($im, 0xFF, 0x00, 0x00);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
imagefilledrectangle($im, 0, 0, 299, 99, $red);
$font_file = '/font/NanumGothic.ttf';
imagefttext($im, 13, 0, 105, 55, $black, $font_file, 'PHP Manual');
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
추천
0
0
댓글 0개