php编程给图片增加和绘制边框
<?
//绘制图片边框 www.zzzyk.com$color = imagecolorallocate($img, 255, 0, 0);//
drawBorder($img,$color, 1);
function drawBorder($img, $color, $thickness = 1)
{$x1 = 0;
$y1 = 0;
$x2 = imagesx($img) - 1;
$y2 = imagesy($img) - 1;
for($i = 0; $i < $thickness; $i++){
imagerectangle($img, $x1++, $y1++, $x2--, $y2--, $color);
}
}
?>
在线给图片绘制边框:http://www.zhaoxi.org/h/19.htm