gb画图练习笔记
摘要: /** 燕十八 公益PHP培训 课堂地址:YY频道88354001 学习社区:www.zixue.it **/
/*$img = imagecreatetruecolor(300, 300);
$red = imagecolorallocate($img,mt_rand(0, 255), mt_rand(0, 255),mt_rand(0, 255));
$alpha_color = imagecolorallocatealpha($img, 110, 20, 121, 30);
imagefill($img, 0, 0, $alpha_color);
$jpg = imagecreatefromjpeg('b.jpg');
imagecopy($jpg, $img, 0, 0, 0, 0, 300,300);
header("content-type:image/jpeg");
imagejpeg($jpg);*/
/*$img = imagecreatetruecolor(500, 300);
$green = imagecolorallocate($img, 0, 250, 0);
imagefill($img,110, 0, $green);
header("content-type:image/jpeg");
imagejpeg($img);*/
/*$img = imagecreatefromjpeg("cc.jpg");
$green = imagecolorallocate($img, 200, 122, 0);
imagefill($img, 100, 0, $green);
$border = imagecolorat($img, 316, 49);
imagefilltoborder($img, 0, 0, $border, $green);
header("content-type:image/jpeg");
imagejpeg($img);*/
$img = imagecreatefromgif('logo.gif');
$img2 = imagecreatetruecolor(500, 500);
$img2 = imagecreatefromjpeg("cc.jpg");
imagesettile($img2, $img);
$blue = imagecolorallocate($img2, 0, 0, 111);
imagefill($img2,0,0,IMG_COLOR_TILED);
header("content-type:image/jpeg");
imagejpeg($img2);
浙公网安备 33010602011771号