xRobot
xRobot

Reputation: 26567

Capture webcam images always at max resolution !

Is there a way to know the max resolution of a webcam ? I need to capture images from webcam and send its on another notebook throught internet.

So I want to capture images at max resolution indipendently from webcam automatically without setting the resolution every time ( if I have a webcam with 1.3 MPixel, I want to capture images at 1.3 MPixel; If I have a webcam with 640x480 Pixel, I want to capture images at 640x480 Pixel; and so on... ).

How can I do that ?

Upvotes: 0

Views: 1344

Answers (1)

phwd
phwd

Reputation: 19995

You will need the camera object

var cam:Camera = new Camera();

and you will use the camera's width and height which are in pixels. Then you can do whatever you like it with it. Example:

var bitp:BitmapData = new BitmapData(cam.width, cam.height); 
var img:Bitmap = new Bitmap(bitp);

Upvotes: 1

Related Questions