Forum Libraries, Components, and Plugins


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Fit image to canvasview

PierreParmPierreParm FRMember ✭✭


I'm trying to implement a drawing functionality in my Xamarin Forms app thanks to SkiaSharp.
It is working fine, I'm following the demos which work well.

My issue is that I set a bitmap in the canvas:

  private async Task GetCanvasImage()
      var imageBytes = await this.picManager.GetImagBytes("Photo_1f527ba5-33cc-4198-8280-aa579baf50fb");
      var bitmap = SKBitmap.Decode(imageBytes);

The issue is that I want the picture to fit the screen borders.
But, I do not want to resize the image itself so that I keep the image quality and resolution.

Has anyone done that before ?

Thanks !

Best Answer


  • PierreParmPierreParm FRMember ✭✭

    Excellent ! Once again, thank you very much !

Sign In or Register to comment.