Ejemplo n.º 1
0
        internal Task <Stream> PlatformOpenReadAsync(ScreenshotFormat format)
        {
            var f = format switch
            {
                ScreenshotFormat.Jpeg => Bitmap.CompressFormat.Jpeg,
                _ => Bitmap.CompressFormat.Png,
            };

            var result = new MemoryStream(bmp.AsImageBytes(f, 100)) as Stream;

            return(Task.FromResult(result));
        }