Ejemplo n.º 1
0
 public Image(string filePath)
 {
     using (var stream = Utility.ReadFile(filePath))
     {
         this.image  = SixLabors.ImageSharp.Image.Load <SixLabors.ImageSharp.PixelFormats.Rgba32>(stream);
         this.Data   = new Rgba32[this.image.Width * this.image.Height];
         this.Data   = image.GetPixelSpan().ToArray();
         this.Width  = this.image.Width;
         this.Height = this.image.Height;
     }
 }