Http://k11hao.iteye.com/blog/1477478
Some time ago, due to the need to use the web page photography function, I found many plug-ins on the Internet, which must belong
| Imagecaponweb is the best choice for this control, but it is a pity to charge fees |
Otherwise, the function is not suitable, so I wrote a control like this.
Usage
<Object
Id = "camera"
Classid = "CLSID: 792fd9b8-5917-45d2-889d-c49fd174d4e0"
Codebase = "capproj1.ocx # version = 1, 0, 0"
Width = 350
Height = 250
Align = center
Hspace = 0
Vspace = 0
>
</Object>
<SCRIPT>
VaR camera = Document. getelementbyid ("camera ");
Function start (){
// Start the js method of the camera. This method determines the size of the window display, but there are still some minor issues.
Camera. Start (400,300 );}
Function save (){
// Save the image to the local device. The first parameter is the Save address, and the following parameter is the image resolution.
Camera. SaveFile ("C: \ wu.jpg", 800,600 );
Picvalue is base64-encoded,
VaR picvalue1_camera.jpeg base64;
}
</SCRIPT>
- Webphoto .rar (258.9 KB)
- Downloads: 71
- Source code of webcamera photo collection. rar (297.6 KB)
- Downloads: 31