B4J Question Webcam Capture HD cameras

Chris Tyrie

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/
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?

B4X:
Dimension[] nonStandardResolutions = new Dimension[] {
            WebcamResolution.PAL.getSize(),
            WebcamResolution.HD.getSize(),
            new Dimension(2000, 1000),
            new Dimension(1000, 500),
        };
        //@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();
 
Top