PHP를 이용하여 그림그리기를 연습해 보았습니다.
업무에 필요하진 않았지만.. 호기심이 발동해서.. ^^


<?
 $height = 200;
 $width = 200;
 $im = ImageCreateTrueColor($width, $height);
 $white = ImageColorAllocate($im, 255, 255, 255);
 $blue = ImageColorAllocate($im, 0, 0, 64);
 
 //paint
 ImageFill($im, 0, 0, $blue);
 ImageLine($im, 0, 0, $width, $height, $white);
 ImageString($im,4, 50, 150, 'sales', $white);
 Header('Content-type:image/png');
 ImagePng($im);
 
 ImageDestroy($im);
?>

[결과보기]


Posted by 달빛변신
,