flex+php在线拍照二
程序员文章站
2022-05-04 10:16:59
...
flex+php在线拍照
绘制头像文件:
class Image{
public function createjpeg($width,$height,$bitmap_data)
{
$img=imagecreatetruecolor($width,$height);
$m_tempPics=explode(',',$bitmap_data);
for ($i = 0; $i {
for ($j = 0; $j {
$pic_argb =(int) $m_tempPics[$i * $height + $j];
imagesetpixel($img,$i,$j,$pic_argb);
}
}
imagejpeg($img,"../../image/header/0.jpg");
imagedestroy($img);
return true;
}
}
?>