Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Why is the rotated image being drawn?

acejack15acejack15 Member ✭✭
edited May 24 in Xamarin.Forms

Greetings friends, I am developing an app where the user browses on their device to select an image and this is drawn on a canvas, I am using skiasharp for this, the problem is that I use the app on a Redmi I notice 8 and it works well but I use it on a Galaxy E7 android 5.1 and rotate the image draws it horizontally, I am using images with 90 degree rotation metadata but in the redmi everything is fine I do not understand why this happens in the galaxy E7, I appreciate any help

    `if (libraryBitmap.Height > libraryBitmap.Width)
            {
                canvasView2.HeightRequest = 400;
                canvasView2.WidthRequest = 1000;
            }
            else
            {
                canvasView2.HeightRequest = 300;
                canvasView2.WidthRequest = 1000;
            }
            libraryBitmap_heigth = libraryBitmap.Height;
            libraryBitmap_width = libraryBitmap.Width;
            float left = 0;
            float top = 0;
            float right = info.Width;
            float bottom = info.Height;
            SKRect rect = new SKRect(left, top, right, bottom);
            App.ScreenHeight = info.Height;
            App.ScreenWidth = info.Width;

            canvas.DrawBitmap(libraryBitmap, rect);`
Sign In or Register to comment.