Exemplo n.º 1
0
        public SKImage LoadImage(Stream stream)
        {
            var data = SKImage.FromStream(stream);

            using var image = SkiaSharp.SKImage.FromEncodedData(data);
            return(new SKImage
            {
                Data = data,
                Width = image.Width,
                Height = image.Height
            });
        }
Exemplo n.º 2
0
        public SKImage LoadImage(Stream stream)
        {
            var data = SKImage.FromStream(stream);

            using var image = new AMI.Bitmap(stream);
            return(new SKImage
            {
                Data = data,
                Width = (float)image.Size.Width,
                Height = (float)image.Size.Height
            });
        }