当前位置: 代码迷 >> Web前端 >> flex web 调用摄像头护持图片
  详细解决方案

flex web 调用摄像头护持图片

热度:168   发布时间:2012-10-11 10:16:10.0
flex web 调用摄像头保持图片
用flex _camera=Camera.getCamera();
_bitmapData=new BitmapData(CAMERA_WIDTH,CAMERA_HEIGHT);
_bitmapData.draw(cameraDisplay);

var bytes:ByteArray=_pngEn.encode(_bitmapData);
_fr.save(bytes,getDateString()+".png");

//release
bytes.length=0;
_bitmapData.dispose();

保存图片