B4J Question Webcam Capture HD cameras

Discussion in 'B4J Questions' started by Chris Tyrie, Feb 4, 2018.

Tags:
  1. Chris Tyrie

    Chris Tyrie New Member Licensed User

    I have been working with the webcam capture library by CanguruCode https://www.b4x.com/android/forum/threads/class-webcam-capture.53211/

    It does not have a method for setting to HD resolutions.

    I've found some java code to do it but I'm not having any luck B4Jing it.
    Is there a Java guru that can add the following code to the library so it will allow HD?

    Code:
    Dimension[] nonStandardResolutions = new Dimension[] {
                WebcamResolution.PAL.getSize(),
                WebcamResolution.HD.getSize(),
                new Dimension(
    20001000),
                new Dimension(
    1000500),
            
    };
            //@formatter:on

            // your camera have to support HD720p to run this code
            Webcam webcam = Webcam.getDefault();
            webcam.setCustomViewSizes(nonStandardResolutions);
            webcam.setViewSize(WebcamResolution.HD.getSize());
    webcam.open();
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice