camera_camera
camera_camera copied to clipboard
Preview Rotion Problem Android
When i rotate the phone from portrait to Landscape, the Preview rotates wrong. Portrait is correct, landscape shows wrong rotated preview.
Any update for this topic?
Oh sorry, i have not seen your question. Problem is still present since update flutter to 2.5, The Preview in Landscape is wrong. two screenshots, may keyboard in Landscape and in Portrait ` MaterialPageRoute( builder: (_) => CameraCamera( cameraSide: CameraSide.all, onFile: (file) async {
if (file != null) {
final result = await FlutterImageCompress.compressWithFile(
file.absolute.path,
minWidth: 400,
minHeight: 600,
quality: 50,
//rotate: 0,
);
....
setState(() {
Navigator.pop(context);
});
}
}))`
ok, Problem only in Android. Looks like the CameraStream do no change on Android when the deviceorientation is changed in the Preview. Solved it by using Orientation.builder and Transform() in the Preview for Android. Code is very ugly, but i can send you the code if you are interested.
Hello @klausszilvas ,
I have the same issue. Can you share details about your founding : classe / method ? Can you share the corrections you have done on your code ?
Thank you,
Hello @mabroukb in the meanwhile i kicked out the camera_camera plugin, because the code was not stable. I developed a new previewclass based on the example of the camera plugin camerapreview.zip .
oh really ? that's sad, I think that plugins and other open libraries are the best way to not reinvent the wheel. thank you for sharing your code 👍
hello @mabroukb , I agree with you. We make programs for mobile documentation. With the programs, customers sometimes take 200 photos per day and device. It is difficult to explain to our customers why the camera previews are displayed incorrectly. So we need a quick solution.
I have the same issue, please fix :(