MAUI - Android Camera2 - How set Rotate and Crop in CaptureRequest

35 Views Asked by At

I am trying to set the crop rect and the rotation for a capture request of the Android.Camera2.CameraDevice. The CaptureRequest.Builder has a Set function where I can set the values for multiple keys.

But when I try to do something like:

builder.Set(CaptureRequest.ScalerRotateAndCrop180, null);

I get the message that this way is obsolete and that I should use the ScalerRotateAndCropType directly.

I can also do something like

builder.Set(CaptureRequest.ScalerRotateAndCrop, null);

This seems to be ok, but the rotation is missing.

So how do I use these functions correctly?

0

There are 0 best solutions below