Skip to content

Impossible to take a picture with a good resolution using the font facing camera. #19

Open
@saiimons

Description

@saiimons

When setting a resolution in the preview, such as 1280x960 on a Nexus 5, the output resolution is 320x240.

The camera is set up this way:

        mCameraSource = new CameraSource.Builder(context, detector)
                .setRequestedPreviewSize(1280, 960)
                .setFacing(CameraSource.CAMERA_FACING_FRONT)
                .setRequestedFps(30.0f)
                .build();

And the picture is taken this way:

                mCameraSource.takePicture(null, new CameraSource.PictureCallback() {
                    @Override
                    public void onPictureTaken(byte[] bytes) {
                        Bitmap bmp = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
                        Log.d("BITMAP", bmp.getWidth() + "x" + bmp.getHeight());
                    }
                });

You can find the modified sample code to help reproduce the issue here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions