Camera.setMode sets small resolution

2019-09-18 13:41发布

I have a Lenovo tablet with Windows 8.1 with front and rear cameras. The rear camera is IMX175 and should supports 3280*2464 pixels.

When I call setMode with those dimensions I never got them back (in Camera.width/height) but some lower numbers.

In IE (11) I get 1280*960

In Chrome I get 1920*1440

I tried to change the frame rate to several options, set the stage.quality to StageQuality.BEST.

Any help will be appreciated

1条回答
一纸荒年 Trace。
2楼-- · 2019-09-18 14:18

There are several reasons between the cam-specifications, flash-player and browsers which affect the final maximal resolution. I dont think, you'll able to attach the full (foto)resolution of the IMX175 to a video-object... In the past I wrote this script to detect the real possible resolutions of webcams in flash.

function testCams():void
{
    var camNames:Array = Camera.names;

    for (var i:int; i< camNames.length; i++)
    {
        var camName:String = camNames[i];
        trace(camName,"\n================================");

        var cam:Camera = Camera.getCamera(i.toString());
        cam.setMode(8000,6000,1);
        var camMaxWidth:Number = cam.width;
        var camMaxHeight:Number = cam.width;
        trace("Maxima w,h: ",camMaxWidth,camMaxHeight);
        //4:3
        cam.setMode(camMaxWidth,camMaxWidth/4*3, 100);
        trace("Maximum 4:3 w,h: ",cam.width,cam.height);
        //16:9
        cam.setMode(camMaxWidth,camMaxWidth/16*9, 100);
        trace("Maximum 16:9 w,h: ",cam.width,cam.height);

        trace("Maximum fps: ",cam.fps);
    }
}

testCams();

Test your cams and look what mode is possible. Greetings.

查看更多
登录 后发表回答