Forum Libraries, Components, and Plugins

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.