Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
173 views
in Technique[技术] by (71.8m points)

actionscript 3 - Camera.setMode sets small resolution

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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,"
================================");

        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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...