title: Fastest way to scale an SKImage (SkiaSharp)
body: <p>I'm looking for the fastest way to resize an SKImage. Unfortunately I found a few examples.</p>
  
  <p>I ask this because if I perform these functions in parallel (in my case about 60 threads) the execution time of each single scaling function increases up to twenty times as much.</p>
  
  <p>I tried with the following methods and the performance looks very similar, is there anything better?</p>
  
  <p>Method 1:</p>
  
  <pre><code>SKImage src = (...);
  SKImageInfo info = new SKImageInfo(width, height, SKColorType.Bgra8888);
  SKImage output = SKImage.Create(info);
  src.ScalePixels(output.PeekPixels(), SKFilterQuality.None);
  </code></pre>
  
  <p>Method 2:</p>
  
  <pre><code>SKImage src = (...);
  SKImage output;
  float resizeFactorX = (float)width / (float)Src.Width;
  float resizeFactorY = (float)height / (float)Src.Height;
  
  using (SKSurface surface = SKSurface.Create((int)(Src.Width * 
         resizeFactorX), (int)(Src.Height * resizeFactorY),
         SKColorType.Bgra8888, SKAlphaType.Opaque))
  {
    surface.Canvas.SetMatrix(SKMatrix.MakeScale(resizeFactorX, resizeFactorY));
    surface.Canvas.DrawImage(Src, 0, 0);
    surface.Canvas.Flush();
    output = surface.Snapshot();
  }
  </code></pre>