Flutter: knowing if the front camera is mirroring the image
2,371
For existing workarounds mentioned: https://github.com/flutter/flutter/issues/27650
Don't forget import these modules:
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.util.DisplayMetrics;
import java.io.ByteArrayOutputStream;
Author by
Mohamed Ali
Updated on December 19, 2022Comments
-
Mohamed Ali over 1 year
I'm implementing live face detection feature in a Flutter app, the problem is that the front camera is mirroring the image in some phone types while the others not
it's easy to mirror the marking rectangle too, but I can't determine if mirroring takes place or not
Isn't there a programmatic way to detect mirroring, or to prevent it?
-
gbryant about 4 yearsI'm just starting on an app component that will use the camera, and researching this now, as it was a problem in the previous (Swift) version. It might help if you listed the "some phone types" where it is and is not happening. Also, there are existing workarounds here: github.com/flutter/flutter/issues/27650
-