<?php
$src = "02.png";
$info = getimagesize($src);
$type = image_type_to_extension($info[2],false);
$fun = "imagecreatefrom{$type} ";
$image = $fun($src);
$font = "arial.ttf";
$content = "欢迎来到PHP中文网";
$col = imagecolorallocatealpha($image, 255, 255, 255 , 30);
imagettftext($image, 20, 0, 20, 30, $col, $font, $content);
header("content-type:".$info['mime']);
$func = "이미지{$type}";
$func($image);
$func($image,'FFF.'.$type);
imagedestroy($image);
앞에 헤더를 추가하세요. header("Content-type: text/html; charset=utf-8");