diff --git a/BarcodeScanning.Native.Maui/BarcodeScanning.Native.Maui.csproj b/BarcodeScanning.Native.Maui/BarcodeScanning.Native.Maui.csproj index 2c5fe48..845d018 100644 --- a/BarcodeScanning.Native.Maui/BarcodeScanning.Native.Maui.csproj +++ b/BarcodeScanning.Native.Maui/BarcodeScanning.Native.Maui.csproj @@ -1,7 +1,7 @@  - net9.0-android;net9.0-ios;net9.0-maccatalyst; + net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst; true @@ -10,7 +10,7 @@ true true enable - 2.0.0 + 2.0.1 Alen Friščić MIT README.md diff --git a/BarcodeScanning.Native.Maui/Platform/Android/BarcodeAnalyzer.cs b/BarcodeScanning.Native.Maui/Platform/Android/BarcodeAnalyzer.cs index 915c2d3..144052b 100644 --- a/BarcodeScanning.Native.Maui/Platform/Android/BarcodeAnalyzer.cs +++ b/BarcodeScanning.Native.Maui/Platform/Android/BarcodeAnalyzer.cs @@ -27,6 +27,7 @@ internal class BarcodeAnalyzer : Java.Lang.Object, ImageAnalysis.IAnalyzer, IOnS private bool _processInverted = false; private bool _updateCoordinateTransform = false; + private int _transformDegrees = 0; private Point _previewViewCenter = new(); private RectF _previewViewRect = new(); @@ -82,9 +83,10 @@ public void Analyze(IImageProxy proxy) _cameraManager.CameraView.TriggerOnImageCaptured(image); } - if (_updateCoordinateTransform) + if (_updateCoordinateTransform || _transformDegrees != _proxy.ImageInfo.RotationDegrees) { _coordinateTransform = _cameraManager.GetCoordinateTransform(_proxy); + _transformDegrees = _proxy.ImageInfo.RotationDegrees; _previewViewCenter.X = _cameraManager.PreviewView.Width / 2; _previewViewCenter.Y = _cameraManager.PreviewView.Height / 2;